00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : David BEILLOIN (Oct 2005) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef SO_PERF_COUNTER_MANAGER_H 00026 #define SO_PERF_COUNTER_MANAGER_H 00027 00028 #include <Inventor/SbString.h> 00029 #include <Inventor/SbTime.h> 00030 00031 class SoPerfCounterManagerImpl; 00032 class SoPerfCounter; 00033 00045 class SoPerfCounterManager { 00046 public: 00047 00051 static SoPerfCounterManager* getInstance(); 00052 00057 static SbBool isEnabled(); 00058 00062 void resetAll(); 00063 00068 void removeDisabledCounters() const; 00069 00074 SoPerfCounter* getCounter( SbName name ); 00075 00080 void setInterval( const SbTime &intvl ); 00081 00086 SbTime getInterval(); 00087 00091 void log(); 00092 00096 void update(); 00097 00107 static SbBool registerCounter( SoPerfCounter* ); 00108 00113 static SoPerfCounter* disableCounter( SbName name ); 00114 00115 private: 00116 00118 SoPerfCounter* getCounter( int n ); 00119 00124 static void finish(); 00125 00126 SoPerfCounterManagerImpl* m_soPerfCounterManagerImpl; 00127 00128 private: 00130 static SoPerfCounterManager* Instance(); 00131 00133 ~SoPerfCounterManager(); 00134 00136 SoPerfCounterManager(); 00137 00138 }; 00139 00140 #endif // SO_PERF_COUNTER_MANAGER_H 00141 00142 00143 00144 00145