VTK  9.0.20210115
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkWeakPointerBase Class Reference

Non-templated superclass for vtkWeakPointer. More...

#include <vtkWeakPointerBase.h>

Inheritance diagram for vtkWeakPointerBase:
Collaboration diagram for vtkWeakPointerBase:


class  NoReference

Public Member Functions

 vtkWeakPointerBase () noexcept
 Initialize smart pointer to nullptr. More...
 vtkWeakPointerBase (vtkObjectBase *r)
 Initialize smart pointer to given object. More...
 vtkWeakPointerBase (const vtkWeakPointerBase &r)
 Copy r's data object into the new weak pointer. More...
 vtkWeakPointerBase (vtkWeakPointerBase &&r) noexcept
 Move r's object into the new weak pointer, setting r to nullptr. More...
 ~vtkWeakPointerBase ()
 Destroy smart pointer. More...
vtkWeakPointerBaseoperator= (vtkObjectBase *r)
 Assign object to reference. More...
vtkWeakPointerBaseoperator= (const vtkWeakPointerBase &r)
vtkWeakPointerBaseoperator= (vtkWeakPointerBase &&r) noexcept
vtkObjectBaseGetPointer () const
 Get the contained pointer. More...

Protected Member Functions

 vtkWeakPointerBase (vtkObjectBase *r, const NoReference &)

Protected Attributes



class vtkObjectBaseToWeakPointerBaseFriendship

Detailed Description

Non-templated superclass for vtkWeakPointer.

vtkWeakPointerBase holds a pointer to a vtkObjectBase or subclass instance, but it never affects the reference count of the vtkObjectBase. However, when the vtkObjectBase referred to is destroyed, the pointer gets initialized to nullptr, thus avoid dangling references.

Definition at line 33 of file vtkWeakPointerBase.h.

Constructor & Destructor Documentation

◆ vtkWeakPointerBase() [1/5]

vtkWeakPointerBase::vtkWeakPointerBase ( )

Initialize smart pointer to nullptr.

Definition at line 39 of file vtkWeakPointerBase.h.

◆ vtkWeakPointerBase() [2/5]

vtkWeakPointerBase::vtkWeakPointerBase ( vtkObjectBase r)

Initialize smart pointer to given object.

◆ vtkWeakPointerBase() [3/5]

vtkWeakPointerBase::vtkWeakPointerBase ( const vtkWeakPointerBase r)

Copy r's data object into the new weak pointer.

◆ vtkWeakPointerBase() [4/5]

vtkWeakPointerBase::vtkWeakPointerBase ( vtkWeakPointerBase &&  r)

Move r's object into the new weak pointer, setting r to nullptr.

◆ ~vtkWeakPointerBase()

vtkWeakPointerBase::~vtkWeakPointerBase ( )

Destroy smart pointer.

◆ vtkWeakPointerBase() [5/5]

vtkWeakPointerBase::vtkWeakPointerBase ( vtkObjectBase r,
const NoReference  

Member Function Documentation

◆ operator=() [1/3]

vtkWeakPointerBase& vtkWeakPointerBase::operator= ( vtkObjectBase r)

Assign object to reference.

This removes any reference to an old object.

◆ operator=() [2/3]

vtkWeakPointerBase& vtkWeakPointerBase::operator= ( const vtkWeakPointerBase r)

◆ operator=() [3/3]

vtkWeakPointerBase& vtkWeakPointerBase::operator= ( vtkWeakPointerBase &&  r)

◆ GetPointer()

vtkObjectBase* vtkWeakPointerBase::GetPointer ( ) const

Get the contained pointer.

Definition at line 77 of file vtkWeakPointerBase.h.

Friends And Related Function Documentation

◆ vtkObjectBaseToWeakPointerBaseFriendship

friend class vtkObjectBaseToWeakPointerBaseFriendship

Definition at line 85 of file vtkWeakPointerBase.h.

Member Data Documentation

◆ Object

vtkObjectBase* vtkWeakPointerBase::Object

Definition at line 95 of file vtkWeakPointerBase.h.

The documentation for this class was generated from the following file: