13#ifndef vtkWeakPointerBase_h
14#define vtkWeakPointerBase_h
16#include "vtkCommonCoreModule.h"
19VTK_ABI_NAMESPACE_BEGIN
20class vtkObjectBaseToWeakPointerBaseFriendship;
74 friend class vtkObjectBaseToWeakPointerBaseFriendship;
88#define VTK_WEAK_POINTER_BASE_DEFINE_OPERATOR(op) \
89 inline bool operator op(const vtkWeakPointerBase& l, const vtkWeakPointerBase& r) \
91 return (static_cast<void*>(l.GetPointer()) op static_cast<void*>(r.GetPointer())); \
93 inline bool operator op(vtkObjectBase* l, const vtkWeakPointerBase& r) \
95 return (static_cast<void*>(l) op static_cast<void*>(r.GetPointer())); \
97 inline bool operator op(const vtkWeakPointerBase& l, vtkObjectBase* r) \
99 return (static_cast<void*>(l.GetPointer()) op static_cast<void*>(r)); \
111#undef VTK_WEAK_POINTER_BASE_DEFINE_OPERATOR
abstract base class for most VTK objects
Non-templated superclass for vtkWeakPointer.
vtkWeakPointerBase(const vtkWeakPointerBase &r)
Copy r's data object into the new weak pointer.
vtkWeakPointerBase(vtkObjectBase *r)
Initialize smart pointer to given object.
~vtkWeakPointerBase()
Destroy smart pointer.
vtkObjectBase * GetPointer() const
Get the contained pointer.
vtkWeakPointerBase(vtkWeakPointerBase &&r) noexcept
Move r's object into the new weak pointer, setting r to nullptr.
vtkWeakPointerBase & operator=(vtkObjectBase *r)
Assign object to reference.
vtkWeakPointerBase(vtkObjectBase *r, const NoReference &)
vtkWeakPointerBase & operator=(const vtkWeakPointerBase &r)
Assign object to reference.
vtkWeakPointerBase & operator=(vtkWeakPointerBase &&r) noexcept
Assign object to reference.
vtkWeakPointerBase() noexcept
Initialize smart pointer to nullptr.
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkWeakPointerBase &p)
Compare smart pointer values.
#define VTK_WEAK_POINTER_BASE_DEFINE_OPERATOR(op)