Changeset 340
- Timestamp:
- 10/21/06 13:48:11 (2 years ago)
- Files:
-
- branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatCollector.cpp (modified) (2 diffs)
- branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatCollector.h (modified) (3 diffs)
- branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatElemDesc.cpp (modified) (1 diff)
- branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatElemDesc.h (modified) (4 diffs)
- branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatElemDesc.inl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatCollector.cpp
r106 r340 250 250 /*! Reset all elements to the start value. 251 251 */ 252 void StatCollector::reset( void)252 void StatCollector::reset(StatElemDescBase::ResetMode mode) 253 253 { 254 254 std::vector<StatElem*>::iterator i; … … 256 256 for(i = _elemVec.begin(); i != _elemVec.end(); ++i) 257 257 { 258 if(*i != NULL )258 if(*i != NULL && (*i)->getDesc()->getResetMode() >= mode) 259 259 { 260 260 (*i)->reset(); branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatCollector.h
r106 r340 56 56 57 57 OSG_BEGIN_NAMESPACE 58 59 class StatElem;60 class StatElemDescBase;61 58 62 59 /*! \brief Manager for Stat elements, see \ref PageSystemStatistics for … … 78 75 void clearElems (void ); 79 76 bool isValidID (Int32 id) const; 80 void reset (void ); 77 void reset (StatElemDescBase::ResetMode mode = 78 StatElemDescBase::RESET_DRAW); 81 79 82 80 /*! \} */ … … 250 248 #include "OSGStatCollector.inl" 251 249 252 #define OSGSTATCOLLECTOR_HEADER_CVSID "@(#)$Id :$"250 #define OSGSTATCOLLECTOR_HEADER_CVSID "@(#)$Id$" 253 251 254 252 #endif /* _OSGSTATCOLLECTOR_H_ */ branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatElemDesc.cpp
r106 r340 115 115 116 116 StatElemDescBase::StatElemDescBase(const Char8 *name, 117 const Char8 *description) : 117 const Char8 *description, 118 ResetMode reset) : 118 119 _id ( -1), 119 120 _name ( name), 120 _description(description) 121 _description(description), 122 _resetMode (reset) 121 123 { 122 124 StatElemDescBase *desc = 0; branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatElemDesc.h
r106 r340 91 91 const IDString &getDescription(void); 92 92 93 typedef enum { 94 RESET_NEVER = 0, //!< Never reset by the system 95 RESET_DRAW, //!< Reset when drawing 96 RESET_ALWAYS //!< Reset when StatCollector::reset is called 97 } ResetMode; 98 99 ResetMode getResetMode(void ) const; 100 93 101 /*! \} */ 94 102 /*---------------------------------------------------------------------*/ … … 97 105 98 106 StatElemDescBase(const Char8 *name, 99 const Char8 *description); 107 const Char8 *description, 108 ResetMode reset = RESET_DRAW); 100 109 101 110 /*! \} */ … … 126 135 static std::vector<StatElemDescBase*> *_descVec; 127 136 128 Int32 _id; 129 IDString _name; 130 IDString _description; 137 Int32 _id; 138 IDString _name; 139 IDString _description; 140 ResetMode _resetMode; 131 141 132 142 // only called by OSGStatCollector friend … … 150 160 151 161 StatElemDesc(const Char8 *name, 152 const Char8 *description); 162 const Char8 *description, 163 ResetMode reset = RESET_DRAW); 153 164 154 165 /*! \} */ branches/Dirk_RenderTraversalWork/Source/System/Statistics/Base/OSGStatElemDesc.inl
r106 r340 87 87 } 88 88 89 /*-------------------------------------------------------------------------*/ 90 91 inline 92 StatElemDescBase::ResetMode StatElemDescBase::getResetMode(void) const 93 { 94 return _resetMode; 95 } 89 96 90 97 … … 93 100 template <class T> inline 94 101 StatElemDesc<T>::StatElemDesc(const Char8 *name, 95 const Char8 *description) : 96 StatElemDescBase(name, description) 102 const Char8 *description, 103 ResetMode reset) : 104 StatElemDescBase(name, description, reset) 97 105 { 98 106 }
