53#ifndef vtkObjectBase_h
54#define vtkObjectBase_h
59#define VTK_HAS_INITIALIZE_OBJECT_BASE
61#include "vtkCommonCoreModule.h"
63#include "vtkFeatures.h"
72VTK_ABI_NAMESPACE_BEGIN
74class vtkGarbageCollectorToObjectBaseFriendship;
76class vtkWeakPointerBaseToObjectBaseFriendship;
79typedef void* (*vtkMallocingFunction)(size_t);
80typedef void* (*vtkReallocingFunction)(
void*, size_t);
90 virtual const char* GetClassNameInternal()
const {
return "vtkObjectBase"; }
93#ifdef VTK_WORKAROUND_WINDOWS_MANGLE
95#define GetClassNameA GetClassName
96#define GetClassNameW GetClassName
103 const
char* GetClassName() const;
109 virtual
std::
string GetObjectDescription() const;
111#ifdef VTK_WORKAROUND_WINDOWS_MANGLE
116 const char* GetClassNameA()
const;
117 const char* GetClassNameW()
const;
186#if defined(_WIN32) || defined(VTK_USE_MEMKIND)
188 void*
operator new(
size_t tSize);
189 void operator delete(
void* p);
241 int GetReferenceCount() {
return this->ReferenceCount; }
247 void SetReferenceCount(
int);
255 static
void SetMemkindDirectory(const
char* directoryname);
263 static
bool GetUsingMemkind();
273#ifdef VTK_USE_MEMKIND
283 void Save(
bool newValue);
322 friend class vtkGarbageCollectorToObjectBaseFriendship;
323 friend class vtkWeakPointerBaseToObjectBaseFriendship;
326 friend class vtkTDSCMemkindRAII;
327 static void SetUsingMemkind(
bool);
329 void SetIsInMemkind(
bool);
338 void ClearReferenceCounts();
342 virtual const char* GetDebugClassName()
const;
identify memory leaks at program termination vtkDebugLeaks is used to report memory leaks at the exit...
Detect and break reference loops.
a simple class to control print indentation
A class to help modify and restore the global UsingMemkind state, like SetUsingMemkind(newValue),...
vtkMemkindRAII(vtkMemkindRAII const &)=default
vtkMemkindRAII(bool newValue)
abstract base class for most VTK objects
static vtkFreeingFunction GetCurrentFreeFunction()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void ObjectFinalize()
static vtkIdType GetNumberOfGenerationsFromBaseType(const char *name)
Given a the name of a base class of this class type, return the distance of inheritance between this ...
virtual void PrintTrailer(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void operator=(const vtkObjectBase &)
static vtkMallocingFunction GetCurrentMallocFunction()
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
static vtkReallocingFunction GetCurrentReallocFunction()
static vtkFreeingFunction GetAlternateFreeFunction()
virtual void UnRegisterInternal(vtkObjectBase *, vtkTypeBool check)
virtual vtkTypeBool IsA(const char *name)
Return 1 if this class is the same type of (or a subclass of) the named class.
static vtkObjectBase * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
virtual void RegisterInternal(vtkObjectBase *, vtkTypeBool check)
virtual void PrintHeader(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
std::atomic< int32_t > ReferenceCount
void InitializeObjectBase()
vtkWeakPointerBase ** WeakPointers
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
virtual bool UsesGarbageCollector() const
Indicate whether the class uses vtkGarbageCollector or not.
virtual void Delete()
Delete a VTK object.
virtual void ReportReferences(vtkGarbageCollector *)
virtual vtkIdType GetNumberOfGenerationsFromBase(const char *name)
Given the name of a base class of this class type, return the distance of inheritance between this cl...
static vtkTypeBool IsTypeOf(const char *name)
Return 1 if this class type is the same type of (or a subclass of) the named class.
virtual void FastDelete()
Delete a reference to this object.
void Print(ostream &os)
Print an object to an ostream.
bool GetIsInMemkind() const
A local state flag that remembers whether this object lives in the normal or extended memory space.
vtkObjectBase(const vtkObjectBase &)
void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
Non-templated superclass for vtkWeakPointer.
void *(* vtkMallocingFunction)(size_t)
void *(* vtkReallocingFunction)(void *, size_t)
void(* vtkFreeingFunction)(void *)
#define VTK_MARSHALGETTER(property)
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALEXCLUDE(reason)