#include <OSGStatElem.h>

Public Member Functions | |
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 |
Destructor | |
| virtual | ~StatElem (void) |
Comparison | |
| bool | operator< (const StatElem &other) const |
Creation | |
| virtual StatElem * | clone (void) const =0 |
Operators | |
| virtual StatElem & | operator+= (const StatElem &other)=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.
| StatElem::~StatElem | ( | void | ) | [virtual] |
| StatElem::StatElem | ( | StatElemDescBase * | desc | ) | [protected] |
| osg::StatElem::StatElem | ( | const StatElem & | source | ) | [private] |
| static const char* osg::StatElem::getClassname | ( | void | ) | [inline, static] |
Reimplemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
Definition at line 66 of file OSGStatElem.h.
| bool osg::StatElem::isOn | ( | void | ) | const [inline] |
| void osg::StatElem::setOn | ( | bool | on | ) | [inline] |
| StatElemDescBase * osg::StatElem::getDesc | ( | void | ) | const [inline] |
Definition at line 51 of file OSGStatElem.inl.
References _desc.
Referenced by osg::StatTimeStampElem::clone(), osg::StatTimeElem::clone(), osg::StatStringElem::clone(), osg::StatRealElem::clone(), osg::StatIntOnceElem::clone(), osg::StatIntElem::clone(), and osg::SimpleStatisticsForeground::draw().
00052 { 00053 return _desc; 00054 }
| void osg::StatElem::putToString | ( | std::string & | str, | |
| const char * | format = NULL | |||
| ) | const [pure virtual] |
The putToString method converts the value of the StatElem into a standard STL string.
The conversion can be parameterized by the format string parameter. It is modelled after the printf()-format string. It typically should contain a single "%" value to format the contents of the StatElem.
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
Referenced by osg::SimpleStatisticsForeground::draw().
| virtual bool osg::StatElem::getFromString | ( | const Char8 *& | inVal | ) | [pure virtual] |
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
Referenced by osg::StatCollector::getFromString().
| virtual Real64 osg::StatElem::getValue | ( | void | ) | const [pure virtual] |
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
Referenced by osg::GraphicStatisticsForeground::drawAnalog(), osg::GraphicStatisticsForeground::drawBar(), osg::GraphicStatisticsForeground::drawChart(), osg::GraphicStatisticsForeground::drawLineChart(), osg::GraphicStatisticsForeground::drawText(), and osg::StatCollector::getValue().
| virtual void osg::StatElem::reset | ( | void | ) | [pure virtual] |
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
Referenced by osg::DrawActionBase::start(), osg::PriorityAction::startEvent(), osg::NewActionBase::startEvent(), and osg::DepthFirstStateAction::startEvent().
| bool StatElem::operator< | ( | const StatElem & | other | ) | const |
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.
| virtual StatElem* osg::StatElem::clone | ( | void | ) | const [pure virtual] |
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
Implemented in osg::StatIntElem, osg::StatIntOnceElem, osg::StatRealElem, osg::StatStringElem, osg::StatTimeElem, and osg::StatTimeStampElem.
bool osg::StatElem::_on [private] |
StatElemDescBase* osg::StatElem::_desc [private] |
1.5.5