vtkObjectBase.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00053 #ifndef __vtkObjectBase_h
00054 #define __vtkObjectBase_h
00055
00056 #include "vtkIndent.h"
00057 #include "vtkSystemIncludes.h"
00058
00059 class vtkGarbageCollector;
00060
00061 class VTK_COMMON_EXPORT vtkObjectBase
00062 {
00063 public:
00067 virtual const char *GetClassName() const {return "vtkObjectBase";};
00068
00072 static int IsTypeOf(const char *name);
00073
00077 virtual int IsA(const char *name);
00078
00082 virtual void Delete();
00083
00085
00087 static vtkObjectBase *New()
00088 {return new vtkObjectBase;}
00090
00091 #ifdef _WIN32
00092
00093 void* operator new( size_t tSize );
00094 void operator delete( void* p );
00095 #endif
00096
00099 void Print(ostream& os);
00100
00102
00106 virtual void PrintSelf(ostream& os, vtkIndent indent);
00107 virtual void PrintHeader(ostream& os, vtkIndent indent);
00108 virtual void PrintTrailer(ostream& os, vtkIndent indent);
00110
00112 virtual void Register(vtkObjectBase* o);
00113
00117 virtual void UnRegister(vtkObjectBase* o);
00118
00120
00121 int GetReferenceCount()
00122 {return this->ReferenceCount;}
00124
00126 void SetReferenceCount(int);
00127
00134 void PrintRevisions(ostream& os);
00135
00136 protected:
00137 vtkObjectBase();
00138 virtual ~vtkObjectBase();
00139
00140 virtual void CollectRevisions(ostream& os);
00141
00142 int ReferenceCount;
00143
00144
00145 virtual void ReportReferences(vtkGarbageCollector*);
00146 virtual void RemoveReferences();
00147 virtual void GarbageCollectionStarting();
00148 virtual void GarbageCollectionFinishing();
00149 private:
00150
00151 friend VTK_COMMON_EXPORT ostream& operator<<(ostream& os, vtkObjectBase& o);
00152 friend class vtkGarbageCollector;
00153
00154 protected:
00155
00156 vtkObjectBase(const vtkObjectBase&) {}
00157 void operator=(const vtkObjectBase&) {}
00158
00159 };
00160
00161 #endif
00162