dox/Parallel/vtkThreadSafeLog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00025
#ifndef __vtkThreadSafeLog_h
00026
#define __vtkThreadSafeLog_h
00027
00028
#include "vtkObject.h"
00029
00030 #define VTK_THREAD_SAFE_LOG_MAX 1000
00031
00032 class VTK_PARALLEL_EXPORT vtkThreadSafeLog :
public vtkObject
00033 {
00034
public:
00035
static vtkThreadSafeLog *
New();
00036 vtkTypeRevisionMacro(vtkThreadSafeLog,
vtkObject);
00037
virtual void PrintSelf(ostream& os,
vtkIndent indent);
00038
00040
00041 void StartTimer() { this->Timer->StartTimer();}
00042 void StopTimer() { this->Timer->StopTimer();}
00043 double GetElapsedTime() {
return this->Timer->GetElapsedTime();}
00045
00047
void AddEntry(
char *tag,
float value);
00048
00052
void DumpLog(
char *filename,
int mode = ios::out);
00053
00054
protected:
00055
00056 vtkThreadSafeLog();
00057 ~vtkThreadSafeLog();
00058
00059
00060 char *Tags[
VTK_THREAD_SAFE_LOG_MAX];
00061 float Values[
VTK_THREAD_SAFE_LOG_MAX];
00062 int NumberOfEntries;
00063
00064 vtkTimerLog *Timer;
00065
private:
00066 vtkThreadSafeLog(
const vtkThreadSafeLog&);
00067
void operator=(
const vtkThreadSafeLog&);
00068 };
00069
00070
00071
00072
#endif