Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
implements a WeakPointer class to deal with circular reference problems. More...
#include <berrySmartPointer.h>
Public Types | |
typedef TObjectType | ObjectType |
Public Member Functions | |
WeakPointer () | |
template<class Other > | |
WeakPointer (berry::SmartPointer< Other > sptr) | |
template<class Other > | |
WeakPointer (const WeakPointer< Other > &p) | |
WeakPointer (const WeakPointer &p) | |
template<class Other > | |
WeakPointer & | operator= (const SmartPointer< Other > &r) |
WeakPointer & | operator= (const WeakPointer &other) |
template<class Other > | |
WeakPointer & | operator= (const WeakPointer< Other > &other) |
template<typename R > | |
bool | operator== (const R *o) const |
template<typename R > | |
bool | operator== (const WeakPointer< R > &r) const |
bool | operator< (const WeakPointer &r) const |
SmartPointer< ObjectType > | Lock () const |
void | Reset () |
bool | Expired () const |
~ WeakPointer () | |
implements a WeakPointer class to deal with circular reference problems.
The WeakPointer class implements smart pointer semantics without increasing the reference count. It registers itself at the Object it points to in order to get notified of its destruction and sets its internal pointer to 0. To be able to access an object through a weak pointer, you either use SmartPointer(const WeakPointer&) or the WeakPointer::Lock() method. The first approach throws a BadWeakPointerException if the object has been destroyed, the second returns an empty SmartPointer.
Definition at line 32 of file berrySmartPointer.h.
typedef TObjectType berry::WeakPointer::ObjectType |
Definition at line 41 of file berryWeakPointer.h.
|
inline |
Default Constructor
Definition at line 44 of file berryWeakPointer.h.
|
inlineexplicit |
Constructor
Definition at line 52 of file berryWeakPointer.h.
|
inline |
constructor
Definition at line 64 of file berryWeakPointer.h.
|
inline |
Copy constructor
Definition at line 73 of file berryWeakPointer.h.
|
inline |
Destructor
Definition at line 167 of file berryWeakPointer.h.
|
inline |
Definition at line 161 of file berryWeakPointer.h.
|
inline |
lock method is used to access the referring object
Definition at line 146 of file berryWeakPointer.h.
Referenced by qHash().
|
inline |
Comparison of pointers. Less than comparison.
Definition at line 140 of file berryWeakPointer.h.
|
inline |
Definition at line 82 of file berryWeakPointer.h.
References berry::SmartPointer::GetPointer().
|
inline |
Definition at line 96 of file berryWeakPointer.h.
|
inline |
Definition at line 111 of file berryWeakPointer.h.
|
inline |
Template comparison operators.
Definition at line 127 of file berryWeakPointer.h.
|
inline |
Definition at line 133 of file berryWeakPointer.h.
|
inline |
Definition at line 152 of file berryWeakPointer.h.