46 #ifndef vtkObjectBase_h
47 #define vtkObjectBase_h
52 #define VTK_HAS_INITIALIZE_OBJECT_BASE
54 #include "vtkCommonCoreModule.h"
55 #include "vtkFeatures.h"
64 class vtkGarbageCollectorToObjectBaseFriendship;
66 class vtkWeakPointerBaseToObjectBaseFriendship;
69 typedef void* (*vtkMallocingFunction)(size_t);
70 typedef void* (*vtkReallocingFunction)(
void*, size_t);
80 virtual const char* GetClassNameInternal()
const {
return "vtkObjectBase"; }
83 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
85 #define GetClassNameA GetClassName
86 #define GetClassNameW GetClassName
92 const char* GetClassName()
const;
100 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
105 const char* GetClassNameA()
const;
106 const char* GetClassNameW()
const;
132 static vtkIdType GetNumberOfGenerationsFromBaseType(
const char* name);
142 virtual vtkIdType GetNumberOfGenerationsFromBase(
const char* name);
149 virtual void Delete();
158 virtual void FastDelete();
173 void InitializeObjectBase();
175 #if defined(_WIN32) || defined(VTK_USE_MEMKIND)
177 void*
operator new(
size_t tSize);
178 void operator delete(
void* p);
185 void Print(ostream& os);
194 virtual void PrintSelf(ostream& os,
vtkIndent indent);
195 virtual void PrintHeader(ostream& os,
vtkIndent indent);
196 virtual void PrintTrailer(ostream& os,
vtkIndent indent);
235 void SetReferenceCount(
int);
243 static void SetMemkindDirectory(
const char* directoryname);
251 static bool GetUsingMemkind();
261 #ifdef VTK_USE_MEMKIND
271 void Save(
bool newValue);
279 bool GetIsInMemkind()
const;
306 virtual void ObjectFinalize();
310 friend class vtkGarbageCollectorToObjectBaseFriendship;
311 friend class vtkWeakPointerBaseToObjectBaseFriendship;
314 friend class vtkTDSCMemkindRAII;
315 static void SetUsingMemkind(
bool);
317 void SetIsInMemkind(
bool);
326 void ClearReferenceCounts();
330 virtual const char* GetDebugClassName()
const;
void InitializeObjectBase()
static vtkObjectBase * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void(* vtkFreeingFunction)(void *)
void Print(const std::vector< T > &input, const std::string &name)
Print a vector with an associated name.
A class to help modify and restore the global UsingMemkind state, like SetUsingMemkind(newValue), but safer.
vtkObjectBase(const vtkObjectBase &)
int GetReferenceCount()
Return the current reference count of this object.
Detect and break reference loops.
a simple class to control print indentation
void *(* vtkMallocingFunction)(size_t)
Non-templated superclass for vtkWeakPointer.
abstract base class for most VTK objects
identify memory leaks at program termination vtkDebugLeaks is used to report memory leaks at the exit...
virtual bool UsesGarbageCollector() const
Indicate whether the class uses vtkGarbageCollector or not.
std::atomic< int32_t > ReferenceCount
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkIndent &o)
void *(* vtkReallocingFunction)(void *, size_t)
vtkWeakPointerBase ** WeakPointers
void operator=(const vtkObjectBase &)