vtkThreadSafeLog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkThreadSafeLog_h
00034 #define __vtkThreadSafeLog_h
00035
00036 #include "vtkObject.h"
00037
00038
00039 #define VTK_THREAD_SAFE_LOG_MAX 1000
00040
00041 class VTK_PARALLEL_EXPORT vtkThreadSafeLog : public vtkObject
00042 {
00043 public:
00044 static vtkThreadSafeLog *New();
00045 vtkTypeRevisionMacro(vtkThreadSafeLog, vtkObject);
00046 virtual void PrintSelf(ostream& os, vtkIndent indent);
00047
00049
00050 void StartTimer();
00051 void StopTimer();
00052 double GetElapsedTime();
00054
00056 void AddEntry(char *tag, float value);
00057
00059
00062 void DumpLog(char *filename, int mode);
00063 void DumpLog(char *filename);
00065
00066 protected:
00067
00068 vtkThreadSafeLog();
00069 ~vtkThreadSafeLog();
00070
00071
00072 char *Tags[VTK_THREAD_SAFE_LOG_MAX];
00073 float Values[VTK_THREAD_SAFE_LOG_MAX];
00074 int NumberOfEntries;
00075
00076 vtkTimerLog *Timer;
00077 private:
00078 vtkThreadSafeLog(const vtkThreadSafeLog&);
00079 void operator=(const vtkThreadSafeLog&);
00080 };
00081
00082
00083
00084 #endif