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

GUI/Client/vtkPVTraceHelper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkPVTraceHelper.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00020 #ifndef __vtkPVTraceHelper_h
00021 #define __vtkPVTraceHelper_h
00022 
00023 #include "vtkObject.h"
00024 #include <stdarg.h> // Needed for "va_list" argument 
00025 
00026 class vtkKWObject;
00027 
00028 class VTK_EXPORT vtkPVTraceHelper : public vtkObject
00029 {
00030 public:
00031   static vtkPVTraceHelper* New();
00032   vtkTypeRevisionMacro(vtkPVTraceHelper, vtkObject);
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034 
00036 
00038   virtual void SetTraceObject(vtkKWObject *);
00039   vtkGetObjectMacro(TraceObject, vtkKWObject);
00041   
00043 
00044   vtkSetStringMacro(ObjectName);
00045   vtkGetStringMacro(ObjectName);
00047 
00049 
00054   vtkSetMacro(ObjectNameState,int);
00055   vtkGetMacro(ObjectNameState,int);
00056   //BTX
00057   enum ObjectNameState_t
00058   {
00059     ObjectNameStateUninitialized,
00060     ObjectNameStateDefault,
00061     ObjectNameStateXMLInitialized,
00062     ObjectNameStateSelfInitialized,
00063     ObjectNameStateUserInitialized
00064   };
00065   //ETX
00067 
00069 
00075   virtual void SetReferenceHelper(vtkPVTraceHelper *);
00076   vtkGetObjectMacro(ReferenceHelper, vtkPVTraceHelper);
00077   vtkSetStringMacro(ReferenceCommand);
00078   vtkGetStringMacro(ReferenceCommand);
00080 
00082 
00087   virtual int Initialize(ofstream* file);
00088   virtual int Initialize();
00090 
00092 
00094   vtkSetMacro(Initialized, int);
00095   vtkGetMacro(Initialized, int);
00096   vtkBooleanMacro(Initialized, int);
00098 
00100 
00102   vtkSetMacro(StateInitialized, int);
00103   vtkGetMacro(StateInitialized, int);
00104   vtkBooleanMacro(StateInitialized, int);
00106 
00110   ofstream* GetFile();
00111 
00113 
00118   virtual void AddSimpleEntry(const char *trace);
00119   //BTX
00120   virtual void AddEntry(const char *format, ...);
00121   //ETX
00123 
00125 
00128   static void OutputSimpleEntry(ostream *os, const char *trace);
00129   //BTX
00130   static void OutputEntry(ostream *os, const char *format, ...);
00131   //ETX
00133 
00134 protected:
00135   vtkPVTraceHelper();
00136   ~vtkPVTraceHelper();
00137 
00140   int Initialized;
00141 
00144   int StateInitialized;
00145 
00147 
00148   char *ObjectName;
00149   int ObjectNameState;
00151 
00153   vtkKWObject *TraceObject;
00154 
00157   vtkPVTraceHelper *ReferenceHelper;
00158 
00161   char *ReferenceCommand;
00162 
00164 
00165   static void OutputEntryInternal(
00166     ostream *os, int estimated_length, const char *format, va_list ap);
00168 
00169 private:
00170 
00171   vtkPVTraceHelper(const vtkPVTraceHelper&); // Not implemented
00172   void operator=(const vtkPVTraceHelper&); // Not implemented
00173 };
00174 
00175 #endif
00176 

Generated on Tue May 30 12:31:41 2006 for ParaView by doxygen 1.3.5