#include <OSGStatStringElem.h>

Public Member Functions | |
instance | |
| const std::string & | get (void) const |
| void | set (const std::string &value) |
| void | set (const Char8 *value) |
| virtual void | reset (void) |
| virtual void | putToString (std::string &str, const char *format=NULL) const |
| virtual bool | getFromString (const Char8 *&inVal) |
| virtual Real64 | getValue (void) const |
comparison | |
| bool | operator< (const StatStringElem &other) const |
Creation | |
| virtual StatElem * | clone (void) const |
Operators | |
| virtual StatElem & | operator+= (const StatElem &other) |
Instance | |
| bool | isOn (void) const |
| void | setOn (bool on) |
| StatElemDescBase * | getDesc (void) const |
Comparison | |
| bool | operator< (const StatElem &other) const |
Static Public Member Functions | |
Class Get | |
| static const char * | getClassname (void) |
your_category | |
| static StatElem * | create (StatElemDescBase *desc) |
Protected Member Functions | |
Constructors | |
| StatStringElem (StatElemDescBase *desc) | |
| virtual | ~StatStringElem (void) |
Private Types | |
| typedef StatElem | Inherited |
Private Member Functions | |
| StatStringElem (const StatStringElem &source) | |
| StatStringElem & | operator= (const StatStringElem &source) |
Private Attributes | |
| std::string | _value |
Definition at line 57 of file OSGStatStringElem.h.
typedef StatElem osg::StatStringElem::Inherited [private] |
Definition at line 134 of file OSGStatStringElem.h.
| StatStringElem::StatStringElem | ( | StatElemDescBase * | desc | ) | [protected] |
| StatStringElem::~StatStringElem | ( | void | ) | [protected, virtual] |
| osg::StatStringElem::StatStringElem | ( | const StatStringElem & | source | ) | [private] |
| static const char* osg::StatStringElem::getClassname | ( | void | ) | [inline, static] |
| StatElem * StatStringElem::create | ( | StatElemDescBase * | desc | ) | [static] |
Definition at line 76 of file OSGStatStringElem.cpp.
References StatStringElem().
00077 { 00078 return new StatStringElem(desc); 00079 }
| const std::string & osg::StatStringElem::get | ( | void | ) | const [inline] |
Definition at line 41 of file OSGStatStringElem.inl.
References _value.
Referenced by operator=().
00042 { 00043 return _value; 00044 }
| void osg::StatStringElem::set | ( | const std::string & | value | ) | [inline] |
| void osg::StatStringElem::set | ( | const Char8 * | value | ) | [inline] |
| void StatStringElem::reset | ( | void | ) | [virtual] |
Implements osg::StatElem.
Definition at line 118 of file OSGStatStringElem.cpp.
References _value.
00119 { 00120 _value.resize(0); 00121 }
| void StatStringElem::putToString | ( | std::string & | str, | |
| const char * | format = NULL | |||
| ) | const [virtual] |
Implements osg::StatElem.
Definition at line 87 of file OSGStatStringElem.cpp.
References _value.
00088 { 00089 if(!format) 00090 { 00091 str = _value; 00092 } 00093 else 00094 { 00095 char *temp = new char [strlen(format) + _value.size() + 10]; 00096 sprintf(temp, format, _value.c_str()); 00097 str = temp; 00098 delete [] temp; 00099 } 00100 }
| bool StatStringElem::getFromString | ( | const Char8 *& | inVal | ) | [virtual] |
Implements osg::StatElem.
Definition at line 102 of file OSGStatStringElem.cpp.
References _value.
00103 { 00104 if(inVal != 0) 00105 { 00106 _value = inVal; 00107 } 00108 00109 return true; 00110 }
| Real64 StatStringElem::getValue | ( | void | ) | const [virtual] |
| bool StatStringElem::operator< | ( | const StatStringElem & | other | ) | const |
| StatElem * StatStringElem::clone | ( | void | ) | const [virtual] |
Implements osg::StatElem.
Definition at line 144 of file OSGStatStringElem.cpp.
References osg::StatElem::getDesc(), and StatStringElem().
00145 { 00146 StatStringElem *e = new StatStringElem(getDesc()); 00147 00148 *e = *this; 00149 00150 return e; 00151 }
Implements osg::StatElem.
Definition at line 155 of file OSGStatStringElem.cpp.
References _value.
00156 { 00157 const StatStringElem *o = dynamic_cast<const StatStringElem *>(&other); 00158 00159 _value += " " + o->_value; 00160 00161 return *this; 00162 }
| StatStringElem & StatStringElem::operator= | ( | const StatStringElem & | source | ) | [private] |
Definition at line 125 of file OSGStatStringElem.cpp.
References get().
00126 { 00127 if (this == &source) 00128 return *this; 00129 00130 set(source.get()); 00131 00132 return *this; 00133 }
| bool osg::StatElem::isOn | ( | void | ) | const [inline, inherited] |
Definition at line 41 of file OSGStatElem.inl.
References osg::StatElem::_on.
00042 { 00043 return _on; 00044 }
| void osg::StatElem::setOn | ( | bool | on | ) | [inline, inherited] |
Definition at line 46 of file OSGStatElem.inl.
References osg::StatElem::_on.
00047 { 00048 _on = on; 00049 }
| StatElemDescBase * osg::StatElem::getDesc | ( | void | ) | const [inline, inherited] |
Definition at line 51 of file OSGStatElem.inl.
References osg::StatElem::_desc.
Referenced by osg::StatTimeStampElem::clone(), osg::StatTimeElem::clone(), clone(), osg::StatRealElem::clone(), osg::StatIntOnceElem::clone(), osg::StatIntElem::clone(), and osg::SimpleStatisticsForeground::draw().
00052 { 00053 return _desc; 00054 }
| bool StatElem::operator< | ( | const StatElem & | other | ) | const [inherited] |
Comparison. This does not compare the actual values of the StatElem, as that may not be possible for all types.
Definition at line 134 of file OSGStatElem.cpp.
std::string osg::StatStringElem::_value [private] |
Definition at line 136 of file OSGStatStringElem.h.
Referenced by get(), getFromString(), operator+=(), putToString(), reset(), and set().
1.5.5