Medical Imaging Interaction Toolkit
2016.11.0
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 36 of file berrySmartPointer.h.
typedef TObjectType berry::WeakPointer< TObjectType >::ObjectType |
Definition at line 45 of file berryWeakPointer.h.
|
inline |
Default Constructor
Definition at line 48 of file berryWeakPointer.h.
|
inlineexplicit |
Constructor
Definition at line 56 of file berryWeakPointer.h.
|
inline |
constructor
Definition at line 68 of file berryWeakPointer.h.
|
inline |
Copy constructor
Definition at line 77 of file berryWeakPointer.h.
|
inline |
Destructor
Definition at line 171 of file berryWeakPointer.h.
|
inline |
Definition at line 165 of file berryWeakPointer.h.
Referenced by berry::ExtensionTracker::GetObjects(), and berry::ExtensionTracker::UnregisterObject().
|
inline |
lock method is used to access the referring object
Definition at line 150 of file berryWeakPointer.h.
Referenced by berry::ExtensionTracker::GetObjects(), QmitkDataManagerHotkeysPrefPage::PerformOk(), qHash(), berry::ExtensionTracker::UnregisterObject(), and QmitkDataManagerHotkeysPrefPage::Update().
|
inline |
Comparison of pointers. Less than comparison.
Definition at line 144 of file berryWeakPointer.h.
|
inline |
Definition at line 86 of file berryWeakPointer.h.
|
inline |
Definition at line 100 of file berryWeakPointer.h.
|
inline |
Definition at line 115 of file berryWeakPointer.h.
|
inline |
Template comparison operators.
Definition at line 131 of file berryWeakPointer.h.
|
inline |
Definition at line 137 of file berryWeakPointer.h.
|
inline |
Definition at line 156 of file berryWeakPointer.h.