ITK
6.0.0
Insight 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 | |
using | ObjectType = TObjectType |
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 |
template<typename R > | |
bool | operator== (R r) const |
bool | operator> (const WeakPointer &r) const |
bool | operator>= (const WeakPointer &r) const |
WeakPointer ()=default | |
WeakPointer (ObjectType *p) | |
WeakPointer (std::nullptr_t) | |
ObjectType * | Print (std::ostream &os) const |
Private Attributes | |
ObjectType * | m_Pointer { nullptr } |
using itk::WeakPointer< TObjectType >::ObjectType = TObjectType |
Extract information from template parameter.
Definition at line 48 of file itkWeakPointer.h.
|
default |
Explicitly-defaulted default-constructor.
|
inline |
Constructor, converting from nullptr
.
Definition at line 58 of file itkWeakPointer.h.
|
inline |
Constructor to pointer p.
Definition at line 61 of file itkWeakPointer.h.
|
inline |
Access function to pointer.
Definition at line 90 of file itkWeakPointer.h.
|
inline |
Test if the pointer is not NULL.
Definition at line 97 of file itkWeakPointer.h.
|
inline |
Test if the pointer is NULL.
Definition at line 104 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< itk::ImageToImageFilter >::Print().
|
inline |
Return pointer to object.
Definition at line 69 of file itkWeakPointer.h.
|
inline |
Definition at line 82 of file itkWeakPointer.h.
|
inline |
Overload operator ->.
Definition at line 66 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Less than comparison.
Definition at line 111 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Less than or equal to comparison.
Definition at line 125 of file itkWeakPointer.h.
|
inline |
Template comparison operators.
Definition at line 74 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< itk::ImageToImageFilter >::operator!=().
|
inline |
Comparison of pointers. Greater than comparison.
Definition at line 118 of file itkWeakPointer.h.
|
inline |
Comparison of pointers. Greater than or equal to comparison.
Definition at line 132 of file itkWeakPointer.h.
|
inline |
Function to print object pointed to.
Definition at line 139 of file itkWeakPointer.h.
Referenced by itk::operator<<().
|
private |
The pointer to the object referred to by this smart pointer.
Definition at line 156 of file itkWeakPointer.h.
Referenced by itk::WeakPointer< itk::ImageToImageFilter >::GetPointer(), itk::WeakPointer< itk::ImageToImageFilter >::IsNotNull(), itk::WeakPointer< itk::ImageToImageFilter >::IsNull(), itk::WeakPointer< itk::ImageToImageFilter >::operator ObjectType *(), itk::WeakPointer< itk::ImageToImageFilter >::operator->(), itk::WeakPointer< itk::ImageToImageFilter >::operator<(), itk::WeakPointer< itk::ImageToImageFilter >::operator<=(), itk::WeakPointer< itk::ImageToImageFilter >::operator==(), itk::WeakPointer< itk::ImageToImageFilter >::operator>(), itk::WeakPointer< itk::ImageToImageFilter >::operator>=(), and itk::WeakPointer< itk::ImageToImageFilter >::Print().