#include <StringParameter.hpp>


Public Types | |
| enum | Type { Double, Integer, String, Enum } |
Public Member Functions | |
| void | get (IdentifierSet &I) |
| Does not add other identifiers. | |
| void | set (const real_t d) |
| void | set (const int i) |
| void | set (const char *c) |
| operator std::string & () | |
| operator const std::string & () const | |
| const std::string | typeName () const |
| StringParameter (const StringParameter &sp) | |
| StringParameter (const std::string &s, const char *label) | |
| StringParameter (const char *c, const char *label) | |
| ~StringParameter () | |
| void | set (const std::string &s) |
| const Type & | type () const |
| const char * | label () const |
Protected Attributes | |
| Type | __type |
Private Member Functions | |
| void | reset () |
| std::ostream & | put (std::ostream &os) const |
Private Attributes | |
| const std::string | __defaultStringValue |
| std::string | __stringValue |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Parameter &P) |
Definition at line 35 of file StringParameter.hpp.
enum Parameter::Type [inherited] |
| StringParameter::StringParameter | ( | const StringParameter & | sp | ) | [inline] |
Definition at line 96 of file StringParameter.hpp.
00097 : Parameter(sp), 00098 __defaultStringValue(sp.__defaultStringValue), 00099 __stringValue(sp.__stringValue) 00100 { 00101 ; 00102 }
| StringParameter::StringParameter | ( | const std::string & | s, | |
| const char * | label | |||
| ) | [inline] |
Definition at line 104 of file StringParameter.hpp.
00105 : Parameter(Parameter::String, label), 00106 __defaultStringValue(s), 00107 __stringValue(__defaultStringValue) 00108 { 00109 ; 00110 }
| StringParameter::StringParameter | ( | const char * | c, | |
| const char * | label | |||
| ) | [inline] |
Definition at line 112 of file StringParameter.hpp.
00113 : Parameter(Parameter::String, label), 00114 __defaultStringValue(c), 00115 __stringValue(__defaultStringValue) 00116 { 00117 ; 00118 }
| StringParameter::~StringParameter | ( | ) | [inline] |
| void StringParameter::reset | ( | ) | [inline, private, virtual] |
Implements Parameter.
Definition at line 39 of file StringParameter.hpp.
References __defaultStringValue, and __stringValue.
00040 { 00041 __stringValue = __defaultStringValue; 00042 }
| std::ostream& StringParameter::put | ( | std::ostream & | os | ) | const [inline, private, virtual] |
Implements Parameter.
Definition at line 47 of file StringParameter.hpp.
References __stringValue.
00048 { 00049 os << __stringValue; 00050 return os; 00051 }
| void StringParameter::get | ( | IdentifierSet & | I | ) | [inline, virtual] |
Does not add other identifiers.
Implements Parameter.
Definition at line 55 of file StringParameter.hpp.
| void StringParameter::set | ( | const real_t | d | ) | [inline, virtual] |
Implements Parameter.
Definition at line 60 of file StringParameter.hpp.
References ErrorHandler::normal, and stringify().
00061 { 00062 throw ErrorHandler(__FILE__,__LINE__, 00063 "cannot assignate the real value '"+stringify(d) 00064 +"' to a string parameter", 00065 ErrorHandler::normal); 00066 }

| void StringParameter::set | ( | const int | i | ) | [inline, virtual] |
Implements Parameter.
Definition at line 68 of file StringParameter.hpp.
References ErrorHandler::normal, and stringify().
00069 { 00070 throw ErrorHandler(__FILE__,__LINE__, 00071 "cannot assignate the integer value '"+stringify(i) 00072 +"' to a string parameter", 00073 ErrorHandler::normal); 00074 }

| void StringParameter::set | ( | const char * | c | ) | [inline, virtual] |
Implements Parameter.
Definition at line 76 of file StringParameter.hpp.
References __stringValue.
00077 { 00078 __stringValue = c; 00079 }
| StringParameter::operator std::string & | ( | ) | [inline] |
Definition at line 81 of file StringParameter.hpp.
References __stringValue.
00082 { 00083 return __stringValue; 00084 }
| StringParameter::operator const std::string & | ( | ) | const [inline] |
Definition at line 86 of file StringParameter.hpp.
References __stringValue.
00087 { 00088 return __stringValue; 00089 }
| const std::string StringParameter::typeName | ( | ) | const [inline, virtual] |
| void Parameter::set | ( | const std::string & | s | ) | [inline, inherited] |
| const Type& Parameter::type | ( | ) | const [inline, inherited] |
Definition at line 74 of file Parameter.hpp.
References Parameter::__type.
00075 { 00076 return __type; 00077 }
| const char * Parameter::label | ( | ) | const [inherited] |
Definition at line 26 of file Parameter.cpp.
References Parameter::__label.
00027 { 00028 return __label; 00029 }
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Parameter & | P | |||
| ) | [friend, inherited] |
const std::string StringParameter::__defaultStringValue [private] |
std::string StringParameter::__stringValue [private] |
Definition at line 45 of file StringParameter.hpp.
Referenced by operator const std::string &(), operator std::string &(), put(), reset(), and set().
Type Parameter::__type [protected, inherited] |
1.5.6