VTK
9.0.1
|
Hold a reference to a vtkObjectBase instance. More...
#include <vtkMeta.h>
Public Member Functions | |
vtkSmartPointer () noexcept | |
Initialize smart pointer to nullptr. More... | |
vtkSmartPointer (const vtkSmartPointer &r) | |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer. More... | |
template<class U > | |
vtkSmartPointer (const vtkSmartPointer< U > &r) | |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer. More... | |
vtkSmartPointer (vtkSmartPointer &&r) noexcept | |
Move the contents of r into this. More... | |
template<class U > | |
vtkSmartPointer (vtkSmartPointer< U > &&r) noexcept | |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer. More... | |
vtkSmartPointer (T *r) | |
Initialize smart pointer to given object. More... | |
template<typename U > | |
vtkSmartPointer (const vtkNew< U > &r) | |
Initialize smart pointer to given object. More... | |
template<typename U > | |
vtkSmartPointer (vtkNew< U > &&r) noexcept | |
Move the pointer from the vtkNew smart pointer to the new vtkSmartPointer, stealing its reference and resetting the vtkNew object to nullptr. More... | |
vtkSmartPointer & | operator= (const vtkSmartPointer &r) |
Assign object to reference. More... | |
template<class U > | |
vtkSmartPointer & | operator= (const vtkSmartPointer< U > &r) |
Initialize smart pointer to given object. More... | |
template<typename U > | |
vtkSmartPointer & | operator= (const vtkNew< U > &r) |
Assign object to reference. More... | |
template<typename U > | |
vtkSmartPointer & | operator= (U *r) |
Assign object to reference. More... | |
T * | GetPointer () const noexcept |
Get the contained pointer. More... | |
T * | Get () const noexcept |
Initialize smart pointer to given object. More... | |
operator T* () const noexcept | |
Get the contained pointer. More... | |
T & | operator* () const noexcept |
Dereference the pointer and return a reference to the contained object. More... | |
T * | operator-> () const noexcept |
Provides normal pointer target member access using operator ->. More... | |
void | TakeReference (T *t) |
Transfer ownership of one reference to the given VTK object to this smart pointer. More... | |
static vtkSmartPointer< T > | New () |
Create an instance of a VTK object. More... | |
static vtkSmartPointer< T > | NewInstance (T *t) |
Create a new instance of the given VTK object. More... | |
static vtkSmartPointer< T > | Take (T *t) |
Transfer ownership of one reference to the given VTK object to a new smart pointer. More... | |
vtkSmartPointer (T *r, const NoReference &n) | |
Initialize smart pointer to given object. More... | |
Hold a reference to a vtkObjectBase instance.
vtkSmartPointer is a class template that provides automatic casting for objects held by the vtkSmartPointerBase superclass.
|
inlinenoexcept |
Initialize smart pointer to nullptr.
Definition at line 62 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer.
Definition at line 70 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer.
Definition at line 76 of file vtkSmartPointer.h.
|
inlinenoexcept |
Move the contents of r into this.
Definition at line 88 of file vtkSmartPointer.h.
|
inlinenoexcept |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer.
Definition at line 91 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer to given object.
Definition at line 101 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer to given object.
Definition at line 108 of file vtkSmartPointer.h.
|
inlinenoexcept |
Move the pointer from the vtkNew smart pointer to the new vtkSmartPointer, stealing its reference and resetting the vtkNew object to nullptr.
Definition at line 120 of file vtkSmartPointer.h.
|
inlineprotected |
Initialize smart pointer to given object.
Definition at line 267 of file vtkSmartPointer.h.
|
inline |
Assign object to reference.
This removes any reference to an old object.
Definition at line 135 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer to given object.
Definition at line 142 of file vtkSmartPointer.h.
|
inline |
Assign object to reference.
This removes any reference to an old object.
Definition at line 156 of file vtkSmartPointer.h.
|
inline |
Assign object to reference.
This adds a new reference to an old object.
Definition at line 169 of file vtkSmartPointer.h.
|
inlinenoexcept |
Get the contained pointer.
Definition at line 181 of file vtkSmartPointer.h.
|
inlinenoexcept |
Initialize smart pointer to given object.
Definition at line 182 of file vtkSmartPointer.h.
|
inlinenoexcept |
Get the contained pointer.
Definition at line 188 of file vtkSmartPointer.h.
|
inlinenoexcept |
Dereference the pointer and return a reference to the contained object.
Definition at line 194 of file vtkSmartPointer.h.
|
inlinenoexcept |
Provides normal pointer target member access using operator ->.
Definition at line 199 of file vtkSmartPointer.h.
|
inline |
Transfer ownership of one reference to the given VTK object to this smart pointer.
This does not increment the reference count of the object, but will decrement it later. The caller is effectively passing ownership of one reference to the smart pointer. This is useful for code like:
vtkSmartPointer<vtkFoo> foo; foo.TakeReference(bar->NewFoo());
The input argument may not be another smart pointer.
Definition at line 213 of file vtkSmartPointer.h.
|
inlinestatic |
Create an instance of a VTK object.
Definition at line 218 of file vtkSmartPointer.h.
|
inlinestatic |
Create a new instance of the given VTK object.
Definition at line 223 of file vtkSmartPointer.h.
|
inlinestatic |
Transfer ownership of one reference to the given VTK object to a new smart pointer.
The returned smart pointer does not increment the reference count of the object on construction but will decrement it on destruction. The caller is effectively passing ownership of one reference to the smart pointer. This is useful for code like:
vtkSmartPointer<vtkFoo> foo = vtkSmartPointer<vtkFoo>::Take(bar->NewFoo());
The input argument may not be another smart pointer.
Definition at line 241 of file vtkSmartPointer.h.