ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkWeakPointer.h>
Implements a weak reference to an object.
WeakPointer implements a weak reference to an object. A natural interface to the class is defined by operator -> (and *) among others. WeakPointer is really nothing more than a standard pointer. It is used to call attention to the fact that it does not adjust the reference count of an object like SmartPointer does. WeakPointer is used internally to Insight to manage (break) reference counting loops. At some point, an object may keep track of how many objects hold weak references to itself. In all cases, however, an outstanding weak reference will not keep an object from destructing.
Definition at line 44 of file itkWeakPointer.h.
Public Types | |
typedef TObjectType | ObjectType |
Public Member Functions | |
ObjectType * | GetPointer () const |
bool | IsNotNull () const |
bool | IsNull () const |
operator ObjectType * () const | |
template<typename R > | |
bool | operator!= (R r) const |
ObjectType * | operator-> () const |
bool | operator< (const WeakPointer &r) const |
bool | operator<= (const WeakPointer &r) const |
WeakPointer & | operator= (const WeakPointer &r) |
WeakPointer & | operator= (ObjectType *r) |
template<typename R > | |
bool | operator== (R r) const |
bool | operator> (const WeakPointer &r) const |
bool | operator>= (const WeakPointer &r) const |
WeakPointer () | |
WeakPointer (const WeakPointer< ObjectType > &p) | |
WeakPointer (ObjectType *p) | |
~WeakPointer () | |
ObjectType * | Print (std::ostream &os) const |
Private Attributes | |
ObjectType * | m_Pointer |
typedef TObjectType itk::WeakPointer< TObjectType >::ObjectType |
Extract information from template parameter.
Definition at line 48 of file itkWeakPointer.h.
|
inline |
Constructor.
Definition at line 51 of file itkWeakPointer.h.
|
inline |
Copy constructor.
Definition at line 55 of file itkWeakPointer.h.
|
inline |
Constructor to pointer p.
Definition at line 58 of file itkWeakPointer.h.
|
inline |
Destructor.
Definition at line 61 of file itkWeakPointer.h.
|
inline |
Access function to pointer.
Definition at line 86 of file itkWeakPointer.h.
Referenced by itk::GPUImageDataManager< itk::GPUImage >::GetImagePointer(), and itk::WeakPointer< OptimizerType >::operator=().
|
inline |
Test if the pointer is not NULL.
Definition at line 90 of file itkWeakPointer.h.
|
inline |
Test if the pointer is NULL.
Definition at line 94 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< OptimizerType >::Print().
|
inline |
Return pointer to object.
Definition at line 69 of file itkWeakPointer.h.
|
inline |
Definition at line 80 of file itkWeakPointer.h.
|
inline |
Overload operator ->.
Definition at line 65 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Less than comparison.
Definition at line 98 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Less than or equal to comparison.
Definition at line 106 of file itkWeakPointer.h.
|
inline |
Overload operator assignment.
Definition at line 115 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< OptimizerType >::operator=().
|
inline |
Overload operator assignment.
Definition at line 119 of file itkWeakPointer.h.
|
inline |
Template comparison operators.
Definition at line 74 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Greater than comparison.
Definition at line 102 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Greater than or equal to comparison.
Definition at line 110 of file itkWeakPointer.h.
|
inline |
Function to print object pointed to.
Definition at line 126 of file itkWeakPointer.h.
|
private |
The pointer to the object referred to by this smart pointer.
Definition at line 143 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< OptimizerType >::GetPointer(), itk::WeakPointer< OptimizerType >::IsNotNull(), itk::WeakPointer< OptimizerType >::IsNull(), itk::WeakPointer< OptimizerType >::operator ObjectType *(), itk::WeakPointer< OptimizerType >::operator!=(), itk::WeakPointer< OptimizerType >::operator->(), itk::WeakPointer< OptimizerType >::operator<(), itk::WeakPointer< OptimizerType >::operator<=(), itk::WeakPointer< OptimizerType >::operator=(), itk::WeakPointer< OptimizerType >::operator==(), itk::WeakPointer< OptimizerType >::operator>(), itk::WeakPointer< OptimizerType >::operator>=(), itk::WeakPointer< OptimizerType >::Print(), itk::WeakPointer< OptimizerType >::WeakPointer(), and itk::WeakPointer< OptimizerType >::~WeakPointer().