#include <itkWeakPointer.h>
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 43 of file itkWeakPointer.h.
Public Types | |
typedef TObjectType | ObjectType |
Public Member Functions | |
ObjectType * | GetPointer () const |
operator ObjectType * () const | |
ObjectType * | operator-> () const |
bool | operator< (const WeakPointer &r) const |
bool | operator<= (const WeakPointer &r) const |
WeakPointer & | operator= (ObjectType *r) |
WeakPointer & | operator= (const WeakPointer &r) |
bool | operator> (const WeakPointer &r) const |
bool | operator>= (const WeakPointer &r) const |
WeakPointer (ObjectType *p) | |
WeakPointer (const WeakPointer< ObjectType > &p) | |
WeakPointer () | |
~WeakPointer () | |
template<typename R> | |
bool | operator!= (R r) const |
template<typename R> | |
bool | operator== (R r) const |
ObjectType * | Print (std::ostream &os) const |
typedef TObjectType itk::WeakPointer< TObjectType >::ObjectType |
Extract information from template parameter.
Definition at line 47 of file itkWeakPointer.h.
itk::WeakPointer< TObjectType >::WeakPointer | ( | ) | [inline] |
Constructor.
Definition at line 50 of file itkWeakPointer.h.
itk::WeakPointer< TObjectType >::WeakPointer | ( | const WeakPointer< ObjectType > & | p | ) | [inline] |
Copy constructor.
Definition at line 54 of file itkWeakPointer.h.
itk::WeakPointer< TObjectType >::WeakPointer | ( | ObjectType * | p | ) | [inline] |
Constructor to pointer p.
Definition at line 57 of file itkWeakPointer.h.
itk::WeakPointer< TObjectType >::~WeakPointer | ( | ) | [inline] |
Destructor.
Definition at line 60 of file itkWeakPointer.h.
ObjectType* itk::WeakPointer< TObjectType >::GetPointer | ( | ) | const [inline] |
Access function to pointer.
Definition at line 85 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< itk::ProcessObject >::operator=().
itk::WeakPointer< TObjectType >::operator ObjectType * | ( | ) | const [inline] |
Return pointer to object.
Definition at line 68 of file itkWeakPointer.h.
bool itk::WeakPointer< TObjectType >::operator!= | ( | R | r | ) | const [inline] |
Definition at line 78 of file itkWeakPointer.h.
ObjectType* itk::WeakPointer< TObjectType >::operator-> | ( | ) | const [inline] |
Overload operator ->.
Definition at line 64 of file itkWeakPointer.h.
bool itk::WeakPointer< TObjectType >::operator< | ( | const WeakPointer< TObjectType > & | r | ) | const [inline] |
Comparison of pointers. Less than comparison.
Definition at line 89 of file itkWeakPointer.h.
bool itk::WeakPointer< TObjectType >::operator<= | ( | const WeakPointer< TObjectType > & | r | ) | const [inline] |
Comparison of pointers. Less than or equal to comparison.
Definition at line 97 of file itkWeakPointer.h.
WeakPointer& itk::WeakPointer< TObjectType >::operator= | ( | ObjectType * | r | ) | [inline] |
Overload operator assignment.
Definition at line 109 of file itkWeakPointer.h.
WeakPointer& itk::WeakPointer< TObjectType >::operator= | ( | const WeakPointer< TObjectType > & | r | ) | [inline] |
Overload operator assignment.
Definition at line 105 of file itkWeakPointer.h.
bool itk::WeakPointer< TObjectType >::operator== | ( | R | r | ) | const [inline] |
Template comparison operators.
Definition at line 73 of file itkWeakPointer.h.
bool itk::WeakPointer< TObjectType >::operator> | ( | const WeakPointer< TObjectType > & | r | ) | const [inline] |
Comparison of pointers. Greater than comparison.
Definition at line 93 of file itkWeakPointer.h.
bool itk::WeakPointer< TObjectType >::operator>= | ( | const WeakPointer< TObjectType > & | r | ) | const [inline] |
Comparison of pointers. Greater than or equal to comparison.
Definition at line 101 of file itkWeakPointer.h.
ObjectType* itk::WeakPointer< TObjectType >::Print | ( | std::ostream & | os | ) | const [inline] |
Function to print object pointed to.
Definition at line 116 of file itkWeakPointer.h.