 |
VTK
9.1.0
|
Go to the documentation of this file.
43 #ifndef vtkObjectBase_h
44 #define vtkObjectBase_h
49 #define VTK_HAS_INITIALIZE_OBJECT_BASE
51 #include "vtkCommonCoreModule.h"
52 #include "vtkFeatures.h"
60 class vtkGarbageCollectorToObjectBaseFriendship;
62 class vtkWeakPointerBaseToObjectBaseFriendship;
65 typedef void* (*vtkMallocingFunction)(size_t);
66 typedef void* (*vtkReallocingFunction)(
void*, size_t);
76 virtual const char* GetClassNameInternal()
const {
return "vtkObjectBase"; }
79 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
81 #define GetClassNameA GetClassName
82 #define GetClassNameW GetClassName
90 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
95 const char* GetClassNameA()
const;
96 const char* GetClassNameW()
const;
165 #if defined(_WIN32) || defined(VTK_USE_MEMKIND)
167 void*
operator new(
size_t tSize);
168 void operator delete(
void* p);
235 #ifdef VTK_USE_MEMKIND
245 void Save(
bool newValue);
282 friend class vtkGarbageCollectorToObjectBaseFriendship;
283 friend class vtkWeakPointerBaseToObjectBaseFriendship;
286 friend class vtkTDSCMemkindRAII;
287 static void SetUsingMemkind(
bool);
289 void SetIsInMemkind(
bool);
vtkWeakPointerBase ** WeakPointers
static vtkFreeingFunction GetAlternateFreeFunction()
void operator=(const vtkObjectBase &)
virtual void PrintHeader(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void(* vtkFreeingFunction)(void *)
bool GetIsInMemkind() const
A local state flag that remembers whether this object lives in the normal or extended memory space.
void Print(ostream &os)
Print an object to an ostream.
virtual void RegisterInternal(vtkObjectBase *, vtkTypeBool check)
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
virtual void PrintTrailer(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void ReportReferences(vtkGarbageCollector *)
static vtkObjectBase * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
std::atomic< int32_t > ReferenceCount
static void SetMemkindDirectory(const char *directoryname)
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
static vtkReallocingFunction GetCurrentReallocFunction()
virtual void UnRegisterInternal(vtkObjectBase *, vtkTypeBool check)
virtual void Delete()
Delete a VTK object.
virtual void FastDelete()
Delete a reference to this object.
void InitializeObjectBase()
static vtkMallocingFunction GetCurrentMallocFunction()
const char * GetClassName() const
Return the class name as a string.
int GetReferenceCount()
Return the current reference count of this object.
vtkObjectBase(const vtkObjectBase &)
void *(* vtkMallocingFunction)(size_t)
abstract base class for most VTK objects
Non-templated superclass for vtkWeakPointer.
a simple class to control print indentation
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...
void SetReferenceCount(int)
Sets the reference count.
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 ...
Detect and break reference loops.
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
A class to help modify and restore the global UsingMemkind state, like SetUsingMemkind(newValue),...
vtkMemkindRAII(bool newValue)
void *(* vtkReallocingFunction)(void *, size_t)
static vtkFreeingFunction GetCurrentFreeFunction()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkTypeBool IsTypeOf(const char *name)
Return 1 if this class type is the same type of (or a subclass of) the named class.
static bool GetUsingMemkind()
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) o...
vtkMemkindRAII(vtkMemkindRAII const &)=default
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
virtual vtkTypeBool IsA(const char *name)
Return 1 if this class is the same type of (or a subclass of) the named class.