#include <OSGStatIntOnceElem.h>
Inheritance diagram for osg::StatIntOnceElem:

Public Types | |
| typedef std::set< UInt32 > | IdHash |
Public Member Functions | |
instance | |
| *virtual void | reset (void) |
| void | add (UInt32 id, Int32 v) |
| void | sub (UInt32 id, Int32 v) |
| void | inc (UInt32 id) |
| void | dec (UInt32 id) |
| Int32 | get (void) const |
| 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 StatIntOnceElem &other) const |
Creation | |
| *virtual StatElem * | clone (void) const |
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 | |
| * | StatIntOnceElem (StatElemDescBase *desc) |
| virtual | ~StatIntOnceElem (void) |
Private Types | |
| typedef StatElem | Inherited |
Private Member Functions | |
| StatIntOnceElem (const StatIntOnceElem &source) | |
| StatIntOnceElem & | operator= (const StatIntOnceElem &source) |
Private Attributes | |
| Int32 | _value |
| IdHash | _ids |
Definition at line 72 of file OSGStatIntOnceElem.h.
|
|
Definition at line 81 of file OSGStatIntOnceElem.h. |
|
|
Definition at line 152 of file OSGStatIntOnceElem.h. |
|
|
Definition at line 72 of file OSGStatIntOnceElem.cpp. Referenced by clone(), and create().
|
|
|
Definition at line 85 of file OSGStatIntOnceElem.cpp.
|
|
|
|
|
|
Reimplemented from osg::StatElem. Definition at line 88 of file OSGStatIntOnceElem.h.
|
|
|
Definition at line 79 of file OSGStatIntOnceElem.cpp. References StatIntOnceElem(). 00080 { 00081 return new StatIntOnceElem(desc); 00082 }
|
|
|
Implements osg::StatElem. Definition at line 116 of file OSGStatIntOnceElem.cpp.
|
|
||||||||||||
|
Definition at line 42 of file OSGStatIntOnceElem.inl. 00043 { 00044 if(_ids.find(id) == _ids.end()) 00045 { 00046 _value += v; 00047 _ids.insert(id); 00048 } 00049 }
|
|
||||||||||||
|
Definition at line 51 of file OSGStatIntOnceElem.inl. 00052 { 00053 if(_ids.find(id) == _ids.end()) 00054 { 00055 _value -= v; 00056 _ids.insert(id); 00057 } 00058 }
|
|
|
Definition at line 60 of file OSGStatIntOnceElem.inl. 00061 { 00062 if(_ids.find(id) == _ids.end()) 00063 { 00064 _value ++; 00065 _ids.insert(id); 00066 } 00067 }
|
|
|
Definition at line 69 of file OSGStatIntOnceElem.inl. 00070 { 00071 if(_ids.find(id) == _ids.end()) 00072 { 00073 _value --; 00074 _ids.insert(id); 00075 } 00076 }
|
|
|
Definition at line 78 of file OSGStatIntOnceElem.inl. References _value. Referenced by getValue(), and operator<(). 00079 { 00080 return _value; 00081 }
|
|
||||||||||||
|
Implements osg::StatElem. Definition at line 91 of file OSGStatIntOnceElem.cpp. References _value. 00092 { 00093 if(!format) 00094 { 00095 FieldDataTraits<Int32>::putToString(_value, str); 00096 } 00097 else 00098 { 00099 char *temp = new char [strlen(format) + 40]; 00100 sprintf(temp, format, _value); 00101 str = temp; 00102 delete [] temp; 00103 } 00104 }
|
|
|
Implements osg::StatElem. Definition at line 106 of file OSGStatIntOnceElem.cpp. References _value. 00107 { 00108 return FieldDataTraits<Int32>::getFromString(_value, inVal); 00109 }
|
|
|
Implements osg::StatElem. Definition at line 111 of file OSGStatIntOnceElem.cpp. References get(). 00112 { 00113 return static_cast<Real64>(get()); 00114 }
|
|
|
Definition at line 137 of file OSGStatIntOnceElem.cpp. References get().
|
|
|
Implements osg::StatElem. Definition at line 144 of file OSGStatIntOnceElem.cpp. References osg::StatElem::getDesc(), and StatIntOnceElem(). 00145 { 00146 StatIntOnceElem *e = new StatIntOnceElem(getDesc()); 00147 00148 *e = *this; 00149 00150 return e; 00151 }
|
|
|
Definition at line 124 of file OSGStatIntOnceElem.cpp. 00125 { 00126 if (this == &source) 00127 return *this; 00128 00129 _value = source._value; 00130 _ids = source._ids; 00131 00132 return *this; 00133 }
|
|
|
Definition at line 41 of file OSGStatElem.inl. References osg::StatElem::_on. 00042 { 00043 return _on; 00044 }
|
|
|
Definition at line 46 of file OSGStatElem.inl. References osg::StatElem::_on. 00047 { 00048 _on = on; 00049 }
|
|
|
Definition at line 51 of file OSGStatElem.inl. References osg::StatElem::_desc. Referenced by osg::StatTimeElem::clone(), osg::StatStringElem::clone(), osg::StatRealElem::clone(), clone(), osg::StatIntElem::clone(), and osg::SimpleStatisticsForeground::draw(). 00052 { 00053 return _desc; 00054 }
|
|
|
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.
|
|
|
Definition at line 154 of file OSGStatIntOnceElem.h. Referenced by add(), dec(), get(), getFromString(), inc(), operator=(), putToString(), reset(), and sub(). |
|
|
Definition at line 156 of file OSGStatIntOnceElem.h. Referenced by add(), dec(), inc(), operator=(), reset(), and sub(). |
1.4.3