Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

perfMon.h

Go to the documentation of this file.
00001 /* ***********************************************************************************
00002         Writer:         Sebastien Bloc
00003         Copyright:      2003-2004
00004         eMail:          sebastien.bloc@free.fr
00005         URL:            http://mignonsoft.free.fr
00006 
00007         This program is free software; you can redistribute it and/or
00008         modify it under the terms of the GNU General Public License
00009         as published by the Free Software Foundation; either version 2
00010         of the License, or (at your option) any later version.
00011 
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU General Public License for more details.
00016 http://www.gnu.org/copyleft/gpl.html    
00017 *********************************************************************************** */
00018 
00023 #ifndef INCLUDE_PERFMON_H
00024 #define INCLUDE_PERFMON_H
00025 
00026 #include "input.h"
00027 #include "MyList.h"
00028 
00029 
00066 class PerfMonitorPoint;
00067 
00068 typedef MyList<double> MyListOfDouble;
00069 class PerfMonitor
00070 {
00071 private:
00072         MyList<MyListOfDouble> records;
00073         MyList<PerfMonitorPoint> points;
00074         BOOL Save();
00075 
00076 public:
00077         BOOL enable;
00078         MyString fileName;
00079 
00080         PerfMonitor();
00081         ~PerfMonitor();
00082 
00083         PerfMonitorPoint * AddTitle(char *name); 
00084         void AddRecord();
00085         void Reset(); 
00086 
00087         PerfMonitorPoint * Find(char *name,BOOL addIfNotExist);
00088         void Reset(char *name);
00089         void Begin(char *name,BOOL reset=FALSE);
00090         void End(char *name);
00091 };
00092 
00093 class PerfMonitorPoint
00094 {
00095 public:
00096         MyString name;
00097         Timer timer;
00098         PerfMonitor *monitor;
00099         double value;
00100         int nbValue;
00101 
00102 public:
00103         PerfMonitorPoint();
00104         PerfMonitorPoint(char *_name,PerfMonitor *_monitor);
00105         void Set(char *_name,PerfMonitor *_monitor);
00106         void operator=(PerfMonitorPoint &src);
00107 
00108         void Reset();
00109         void Begin(BOOL reset=FALSE);
00110         void End();
00111 };
00112 
00113 #endif

Generated on Fri Aug 20 19:19:48 2004 for 3d Controls by doxygen 1.3.6