14#ifndef vtkSmartPointerBase_h
15#define vtkSmartPointerBase_h
17#include "vtkCommonCoreModule.h"
20VTK_ABI_NAMESPACE_BEGIN
97#define VTK_SMART_POINTER_BASE_DEFINE_OPERATOR(op) \
98 inline bool operator op(const vtkSmartPointerBase& l, const vtkSmartPointerBase& r) \
100 return (static_cast<void*>(l.GetPointer()) op static_cast<void*>(r.GetPointer())); \
102 inline bool operator op(vtkObjectBase* l, const vtkSmartPointerBase& r) \
104 return (static_cast<void*>(l) op static_cast<void*>(r.GetPointer())); \
106 inline bool operator op(const vtkSmartPointerBase& l, vtkObjectBase* r) \
108 return (static_cast<void*>(l.GetPointer()) op static_cast<void*>(r)); \
120#undef VTK_SMART_POINTER_BASE_DEFINE_OPERATOR
Detect and break reference loops.
abstract base class for most VTK objects
Non-templated superclass for vtkSmartPointer.
~vtkSmartPointerBase()
Destroy smart pointer and remove the reference to its object.
vtkSmartPointerBase & operator=(vtkObjectBase *r)
Assign object to reference.
void Report(vtkGarbageCollector *collector, const char *desc)
Report the reference held by the smart pointer to a collector.
vtkSmartPointerBase(vtkObjectBase *r, const NoReference &)
vtkSmartPointerBase() noexcept
Initialize smart pointer to nullptr.
vtkSmartPointerBase & operator=(const vtkSmartPointerBase &r)
Assign object to reference.
vtkObjectBase * GetPointer() const noexcept
Get the contained pointer.
#define VTK_SMART_POINTER_BASE_DEFINE_OPERATOR(op)
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkSmartPointerBase &p)
Compare smart pointer values.