VTK
|
Hold a reference to a vtkObjectBase instance. More...
#include <vtkSmartPointer.h>
Inherits vtkSmartPointerBase.
Public Member Functions | |
vtkSmartPointer () | |
vtkSmartPointer (T *r) | |
template<class U > | |
vtkSmartPointer (const vtkSmartPointer< U > &r) | |
vtkSmartPointer & | operator= (T *r) |
template<class U > | |
vtkSmartPointer & | operator= (const vtkSmartPointer< U > &r) |
T * | GetPointer () const |
T * | Get () const |
operator T * () const | |
T & | operator* () const |
T * | operator-> () const |
void | TakeReference (T *t) |
Public Member Functions inherited from vtkSmartPointerBase | |
vtkSmartPointerBase () | |
vtkSmartPointerBase (vtkObjectBase *r) | |
vtkSmartPointerBase (const vtkSmartPointerBase &r) | |
~vtkSmartPointerBase () | |
void | Report (vtkGarbageCollector *collector, const char *desc) |
vtkSmartPointerBase & | operator= (vtkObjectBase *r) |
vtkSmartPointerBase & | operator= (const vtkSmartPointerBase &r) |
vtkObjectBase * | GetPointer () const |
Static Public Member Functions | |
static vtkSmartPointer< T > | New () |
static vtkSmartPointer< T > | NewInstance (T *t) |
static vtkSmartPointer< T > | Take (T *t) |
Protected Member Functions | |
vtkSmartPointer (T *r, const NoReference &n) | |
Protected Member Functions inherited from vtkSmartPointerBase | |
vtkSmartPointerBase (vtkObjectBase *r, const NoReference &) | |
Additional Inherited Members | |
Protected Attributes inherited from vtkSmartPointerBase | |
vtkObjectBase * | Object |
Hold a reference to a vtkObjectBase instance.
vtkSmartPointer is a class template that provides automatic casting for objects held by the vtkSmartPointerBase superclass.
Definition at line 34 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer to NULL.
Definition at line 39 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer to given object.
Definition at line 42 of file vtkSmartPointer.h.
|
inline |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer.
Definition at line 48 of file vtkSmartPointer.h.
|
inlineprotected |
Definition at line 178 of file vtkSmartPointer.h.
|
inline |
Assign object to reference. This removes any reference to an old object.
Definition at line 55 of file vtkSmartPointer.h.
|
inline |
Assign object to reference. This removes any reference to an old object.
Definition at line 66 of file vtkSmartPointer.h.
|
inline |
Get the contained pointer.
Definition at line 75 of file vtkSmartPointer.h.
|
inline |
Get the contained pointer.
Definition at line 79 of file vtkSmartPointer.h.
|
inline |
Get the contained pointer.
Definition at line 87 of file vtkSmartPointer.h.
|
inline |
Dereference the pointer and return a reference to the contained object.
Definition at line 96 of file vtkSmartPointer.h.
|
inline |
Provides normal pointer target member access using operator ->.
Definition at line 104 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 118 of file vtkSmartPointer.h.
|
inlinestatic |
Create an instance of a VTK object.
Definition at line 126 of file vtkSmartPointer.h.
|
inlinestatic |
Create a new instance of the given VTK object.
Definition at line 134 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 149 of file vtkSmartPointer.h.