Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Common/vtkObject.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00066 #ifndef __vtkObject_h
00067 #define __vtkObject_h
00068
00069 #include "vtkObjectBase.h"
00070 #include "vtkSetGet.h"
00071 #include "vtkTimeStamp.h"
00072
00073 class vtkSubjectHelper;
00074 class vtkCommand;
00075
00076 class VTK_COMMON_EXPORT vtkObject : public vtkObjectBase
00077 {
00078 public:
00079 vtkTypeRevisionMacro(vtkObject,vtkObjectBase);
00080
00083 static vtkObject *New();
00084
00085 #ifdef _WIN32
00086
00087 void* operator new( size_t tSize );
00088 void operator delete( void* p );
00089 #endif
00090
00092 virtual void DebugOn();
00093
00095 virtual void DebugOff();
00096
00098 unsigned char GetDebug();
00099
00101 void SetDebug(unsigned char debugFlag);
00102
00105 static void BreakOnError();
00106
00111 virtual void Modified();
00112
00114 virtual unsigned long GetMTime();
00115
00120 virtual void PrintSelf(ostream& os, vtkIndent indent);
00121
00123
00125 static void SetGlobalWarningDisplay(int val);
00126 static void GlobalWarningDisplayOn(){vtkObject::SetGlobalWarningDisplay(1);};
00127 static void GlobalWarningDisplayOff()
00128 {vtkObject::SetGlobalWarningDisplay(0);};
00129 static int GetGlobalWarningDisplay();
00131
00133 virtual void Register(vtkObjectBase* o);
00134
00138 virtual void UnRegister(vtkObjectBase* o);
00139
00141
00150 unsigned long AddObserver(unsigned long event, vtkCommand *,
00151 float priority=0.0);
00152 unsigned long AddObserver(const char *event, vtkCommand *,
00153 float priority=0.0);
00154 vtkCommand *GetCommand(unsigned long tag);
00155 void RemoveObserver(vtkCommand*);
00156
00157 void RemoveObserver(unsigned long tag);
00158 void RemoveObservers(unsigned long event);
00159 void RemoveObservers(const char *event);
00160 int HasObserver(unsigned long event);
00161 int HasObserver(const char *event);
00163
00174
00175
00176
00177
00178 int InvokeEvent(unsigned long event, void *callData);
00179 int InvokeEvent(const char *event, void *callData);
00180
00181 int InvokeEvent(unsigned long event) { return this->InvokeEvent(event, NULL); };
00182 int InvokeEvent(const char *event) { return this->InvokeEvent(event, NULL); };
00183
00184 protected:
00185 vtkObject();
00186 virtual ~vtkObject();
00187
00188 unsigned char Debug;
00189 vtkTimeStamp MTime;
00190 vtkSubjectHelper *SubjectHelper;
00191
00192 private:
00193 vtkObject(const vtkObject&);
00194 void operator=(const vtkObject&);
00195 };
00196
00197 #endif
00198