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

dox/Parallel/vtkThreadSafeLog.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkThreadSafeLog.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00021 #ifndef __vtkThreadSafeLog_h 00022 #define __vtkThreadSafeLog_h 00023 00024 #include "vtkObject.h" 00025 00026 00027 #define VTK_THREAD_SAFE_LOG_MAX 1000 00028 00029 class VTK_PARALLEL_EXPORT vtkThreadSafeLog : public vtkObject 00030 { 00031 public: 00032 static vtkThreadSafeLog *New(); 00033 vtkTypeRevisionMacro(vtkThreadSafeLog, vtkObject); 00034 virtual void PrintSelf(ostream& os, vtkIndent indent); 00035 00037 00038 void StartTimer(); 00039 void StopTimer(); 00040 double GetElapsedTime(); 00042 00044 void AddEntry(char *tag, float value); 00045 00047 00050 void DumpLog(char *filename, int mode); 00051 void DumpLog(char *filename); 00053 00054 protected: 00055 00056 vtkThreadSafeLog(); //insure constructur/destructor protected 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&); // Not implemented. 00067 void operator=(const vtkThreadSafeLog&); // Not implemented. 00068 }; 00069 00070 00071 00072 #endif