#include <OSGStatTimeElem.h>
Inheritance diagram for osg::StatTimeElem:

Public Member Functions | |
instance | |
| *virtual void | reset (void) |
| const Time & | start (void) |
| const Time & | stop (void) |
| const Time & | getTime (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 StatTimeElem &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 | |
| * | StatTimeElem (StatElemDescBase *desc) |
| virtual | ~StatTimeElem (void) |
Private Types | |
| typedef StatElem | Inherited |
Private Member Functions | |
| StatTimeElem (const StatTimeElem &source) | |
| StatTimeElem & | operator= (const StatTimeElem &source) |
Private Attributes | |
| Time | _time |
Definition at line 60 of file OSGStatTimeElem.h.
|
|
Definition at line 130 of file OSGStatTimeElem.h. |
|
|
Definition at line 71 of file OSGStatTimeElem.cpp. Referenced by clone(), and create().
|
|
|
Definition at line 82 of file OSGStatTimeElem.cpp.
|
|
|
|
|
|
Reimplemented from osg::StatElem. Definition at line 70 of file OSGStatTimeElem.h.
|
|
|
Definition at line 76 of file OSGStatTimeElem.cpp. References StatTimeElem(). 00077 { 00078 return new StatTimeElem(desc); 00079 }
|
|
|
Implements osg::StatElem. Definition at line 139 of file OSGStatTimeElem.cpp.
|
|
|
Definition at line 41 of file OSGStatTimeElem.inl. References _time, and osg::getSystemTime(). 00042 { 00043 return (_time = getSystemTime()); 00044 }
|
|
|
Definition at line 46 of file OSGStatTimeElem.inl. References _time, and osg::getSystemTime(). Referenced by osg::RenderAction::stop(). 00047 { 00048 return (_time = (getSystemTime() - _time)); 00049 }
|
|
|
Definition at line 51 of file OSGStatTimeElem.inl. References _time. Referenced by getValue(), and osg::RenderAction::stop(). 00052 { 00053 return _time; 00054 }
|
|
||||||||||||
|
Implements osg::StatElem. Definition at line 88 of file OSGStatTimeElem.cpp. References _time. 00089 { 00090 if(!format) 00091 { 00092 FieldDataTraits1<Time>::putToString(_time, str); 00093 } 00094 else 00095 { 00096 const char *proc = strchr(format,'%'); 00097 char *temp = new char [strlen(format) + 60]; 00098 00099 if(proc) 00100 { 00101 if(! strncmp(proc, "%ms", 3)) 00102 { 00103 std::string fcopy(format); 00104 fcopy.insert((proc - format) + 1,".2f "); 00105 sprintf(temp, fcopy.c_str(), ((double)_time)*1000.); 00106 } 00107 else if(! strncmp(proc, "%r", 2)) 00108 { 00109 std::string fcopy(format); 00110 fcopy.erase((proc - format) + 1, 1); 00111 sprintf(temp, fcopy.c_str(), 1./(double)_time); 00112 } 00113 else 00114 { 00115 sprintf(temp, format, (double)_time); 00116 } 00117 00118 } 00119 else 00120 { 00121 sprintf(temp, format, (double)_time); 00122 } 00123 00124 str = temp; 00125 delete [] temp; 00126 } 00127 }
|
|
|
Implements osg::StatElem. Definition at line 129 of file OSGStatTimeElem.cpp. References _time. 00130 { 00131 return FieldDataTraits1<Time>::getFromString(_time, inVal); 00132 }
|
|
|
Implements osg::StatElem. Definition at line 134 of file OSGStatTimeElem.cpp. References getTime(). 00135 { 00136 return static_cast<Real64>(getTime()); 00137 }
|
|
|
Definition at line 158 of file OSGStatTimeElem.cpp. References _time.
|
|
|
Implements osg::StatElem. Definition at line 165 of file OSGStatTimeElem.cpp. References osg::StatElem::getDesc(), and StatTimeElem(). 00166 { 00167 StatTimeElem *e = new StatTimeElem(getDesc()); 00168 00169 *e = *this; 00170 00171 return e; 00172 }
|
|
|
Definition at line 146 of file OSGStatTimeElem.cpp. References _time. 00147 { 00148 if (this == &source) 00149 return *this; 00150 00151 _time = source._time; 00152 00153 return *this; 00154 }
|
|
|
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 clone(), osg::StatStringElem::clone(), osg::StatRealElem::clone(), osg::StatIntOnceElem::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 132 of file OSGStatTimeElem.h. Referenced by getFromString(), getTime(), operator<(), operator=(), putToString(), start(), and stop(). |
1.4.3