vtkGarbageCollector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00088 #ifndef __vtkGarbageCollector_h
00089 #define __vtkGarbageCollector_h
00090
00091 #include "vtkObject.h"
00092
00093 class vtkGarbageCollectorInternals;
00094
00095 class VTK_COMMON_EXPORT vtkGarbageCollector : public vtkObject
00096 {
00097 public:
00098 vtkTypeRevisionMacro(vtkGarbageCollector,vtkObject);
00099 void PrintSelf(ostream& os, vtkIndent indent);
00100
00103 static void Check(vtkObjectBase* root);
00104
00110 void ReportReference(vtkObjectBase*, const char*);
00111
00113
00115 static void SetGlobalDebugFlag(int flag);
00116 static int GetGlobalDebugFlag();
00118 protected:
00119 vtkGarbageCollector(vtkGarbageCollectorInternals*);
00120 ~vtkGarbageCollector();
00121
00123 virtual void Register(vtkObjectBase*);
00124
00126 virtual void UnRegister(vtkObjectBase*);
00127
00128
00129 void ForwardReportReferences(vtkObjectBase*);
00130 static void ForwardRemoveReferences(vtkObjectBase*);
00131 static void ForwardGarbageCollectionStarting(vtkObjectBase*);
00132 static void ForwardGarbageCollectionFinishing(vtkObjectBase*);
00133
00134
00135 void CheckReferenceLoops(vtkObjectBase* root);
00136
00137 private:
00138
00139 vtkGarbageCollectorInternals* Internal;
00140
00141
00142 friend class vtkGarbageCollectorInternals;
00143
00144 private:
00145 vtkGarbageCollector(const vtkGarbageCollector&);
00146 void operator=(const vtkGarbageCollector&);
00147 };
00148
00149 #endif