#include <OSGStatElem.h>
Inheritance diagram for osg::StatElem:

Instance | |
| *bool | isOn (void) const |
| void | setOn (bool on) |
| StatElemDescBase * | getDesc (void) const |
| virtual void | putToString (std::string &str, const char *format=NULL) const =0 |
| virtual bool | getFromString (const Char8 *&inVal)=0 |
| virtual Real64 | getValue (void) const =0 |
| virtual void | reset (void)=0 |
Public Member Functions | |
Destructor | |
| *virtual | ~StatElem (void) |
Creation | |
| *virtual StatElem * | clone (void) const =0 |
Static Public Member Functions | |
Class Get | |
| *static const char * | getClassname (void) |
Protected Member Functions | |
| StatElem (StatElemDescBase *desc) | |
Private Member Functions | |
| StatElem (const StatElem &source) | |
| StatElem & | operator= (const StatElem &source) |
Private Attributes | |
| bool | _on |
| StatElemDescBase * | _desc |
It mainly provides the general interfaces for accessing the statistics data as a Real64 value via getValue, if possible, and in ASCII via the putToString and getFromString methods. Additionally every StatElem can be switched on or off, to prevent collecting statistics that is not needed, via the setOn methods. Finally, ever StatElem can give information about itself in the form of a osg::StatElemDesc*.
/ext
To add a new StatElem type the given interface has to be implemented. There are no restrictions as to which types are possible, as long as they can be converted to and from a string. See StatIntElem for a simple example.
/endext
Definition at line 57 of file OSGStatElem.h.
|
|
Definition at line 109 of file OSGStatElem.cpp.
|
|
|
Definition at line 103 of file OSGStatElem.cpp.
|
|
|
|
|
|
Reimplemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, and osg::StatTimeElem. Definition at line 66 of file OSGStatElem.h.
|
|
|
Definition at line 41 of file OSGStatElem.inl. References _on. 00042 { 00043 return _on; 00044 }
|
|
|
Definition at line 46 of file OSGStatElem.inl. References _on. 00047 { 00048 _on = on; 00049 }
|
|
|
Definition at line 51 of file OSGStatElem.inl. References _desc. Referenced by osg::StatTimeElem::clone(), osg::StatStringElem::clone(), osg::StatRealElem::clone(), osg::StatIntOnceElem::clone(), osg::StatIntElem::clone(), and osg::SimpleStatisticsForeground::draw(). 00052 { 00053 return _desc; 00054 }
|
|
||||||||||||
|
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, and osg::StatTimeElem. Referenced by osg::SimpleStatisticsForeground::draw(). |
|
|
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, and osg::StatTimeElem. Referenced by osg::StatCollector::getFromString(). |
|
|
|
|
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.
|
|
|
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, and osg::StatTimeElem. |
|
|
Definition at line 115 of file OSGStatElem.cpp. 00116 { 00117 if (this == &source) 00118 return *this; 00119 00120 // copy 00121 00122 _on = source._on; 00123 _desc = source._desc; 00124 00125 return *this; 00126 }
|
|
|
Definition at line 117 of file OSGStatElem.h. Referenced by isOn(), operator=(), and setOn(). |
|
|
Definition at line 119 of file OSGStatElem.h. Referenced by getDesc(), and operator=(). |
1.4.3