vtkObject.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00053 #ifndef __vtkObject_h
00054 #define __vtkObject_h
00055
00056 #include "vtkObjectBase.h"
00057 #include "vtkSetGet.h"
00058 #include "vtkTimeStamp.h"
00059
00060 class vtkSubjectHelper;
00061 class vtkCommand;
00062
00063 class VTK_COMMON_EXPORT vtkObject : public vtkObjectBase
00064 {
00065 public:
00066 vtkTypeRevisionMacro(vtkObject,vtkObjectBase);
00067
00070 static vtkObject *New();
00071
00072 #ifdef _WIN32
00073
00074 void* operator new( size_t tSize );
00075 void operator delete( void* p );
00076 #endif
00077
00079 virtual void DebugOn();
00080
00082 virtual void DebugOff();
00083
00085 unsigned char GetDebug();
00086
00088 void SetDebug(unsigned char debugFlag);
00089
00092 static void BreakOnError();
00093
00098 virtual void Modified();
00099
00101 virtual unsigned long GetMTime();
00102
00107 virtual void PrintSelf(ostream& os, vtkIndent indent);
00108
00110
00112 static void SetGlobalWarningDisplay(int val);
00113 static void GlobalWarningDisplayOn(){vtkObject::SetGlobalWarningDisplay(1);};
00114 static void GlobalWarningDisplayOff()
00115 {vtkObject::SetGlobalWarningDisplay(0);};
00116 static int GetGlobalWarningDisplay();
00118
00120 virtual void Register(vtkObjectBase* o);
00121
00125 virtual void UnRegister(vtkObjectBase* o);
00126
00128
00137 unsigned long AddObserver(unsigned long event, vtkCommand *,
00138 float priority=0.0);
00139 unsigned long AddObserver(const char *event, vtkCommand *,
00140 float priority=0.0);
00141 vtkCommand *GetCommand(unsigned long tag);
00142 void RemoveObserver(vtkCommand*);
00143
00144 void RemoveObserver(unsigned long tag);
00145 void RemoveObservers(unsigned long event);
00146 void RemoveObservers(const char *event);
00147 int HasObserver(unsigned long event);
00148 int HasObserver(const char *event);
00150
00161
00162
00163
00164
00165 int InvokeEvent(unsigned long event, void *callData);
00166 int InvokeEvent(const char *event, void *callData);
00167
00168 int InvokeEvent(unsigned long event) { return this->InvokeEvent(event, NULL); };
00169 int InvokeEvent(const char *event) { return this->InvokeEvent(event, NULL); };
00170
00171 protected:
00172 vtkObject();
00173 virtual ~vtkObject();
00174
00175 unsigned char Debug;
00176 vtkTimeStamp MTime;
00177 vtkSubjectHelper *SubjectHelper;
00178
00179 private:
00180 vtkObject(const vtkObject&);
00181 void operator=(const vtkObject&);
00182 };
00183
00184 #endif
00185