Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Implements a weak reference to an object. More...
#include <mitkWeakPointer.h>
Public Types | |
typedef TObjectType | ObjectType |
typedef Message1< const itk::Object * > | itkObjectEvent |
Public Member Functions | |
WeakPointer () | |
WeakPointer (const WeakPointer< ObjectType > &p) | |
WeakPointer (ObjectType *p) | |
~WeakPointer () | |
ObjectType * | operator-> () const |
operator ObjectType * () const | |
template<typename R > | |
bool | operator== (R r) const |
template<typename R > | |
bool | operator!= (R r) const |
ObjectType * | GetPointer () const |
bool | operator< (const WeakPointer &r) const |
bool | operator> (const WeakPointer &r) const |
bool | operator<= (const WeakPointer &r) const |
bool | operator>= (const WeakPointer &r) const |
bool | IsNotNull () const |
bool | IsNull () const |
WeakPointer & | operator= (const WeakPointer &r) |
WeakPointer & | operator= (ObjectType *r) |
ObjectType * | Print (std::ostream &os) const |
void | OnObjectDelete (const itk::Object *caller, const itk::EventObject &) |
Gets called when the object is deleted or modified. More... | |
void | OnObjectModified (const itk::Object *caller, const itk::EventObject &) |
Public Attributes | |
itkObjectEvent | ObjectDelete |
AddEvent is emitted when the object pointed to gets deleted. More... | |
itkObjectEvent | ObjectModified |
AddEvent is emitted when the object pointed to gets modified. More... | |
Implements a weak reference to an object.
Extends the standard itk WeakPointer by listening to delete events of itk::Objects. When an itk::Object is deleted the WeakPointer sets its internal Pointer to 0. This enables checking against 0 and avoids crashes by accessing changed memory. Furthermore it dispatches Modified events with the mitkMessageDelegate system which is much easier to use.
Definition at line 38 of file mitkWeakPointer.h.
typedef Message1<const itk::Object *> mitk::WeakPointer< TObjectType >::itkObjectEvent |
Definition at line 44 of file mitkWeakPointer.h.
typedef TObjectType mitk::WeakPointer< TObjectType >::ObjectType |
Extract infoirmation from template parameter.
Definition at line 42 of file mitkWeakPointer.h.
|
inline |
Constructor.
Definition at line 54 of file mitkWeakPointer.h.
|
inline |
Copy constructor.
Definition at line 56 of file mitkWeakPointer.h.
|
inline |
Constructor to pointer p.
Definition at line 63 of file mitkWeakPointer.h.
|
inline |
Destructor.
Definition at line 69 of file mitkWeakPointer.h.
|
inline |
Access function to pointer.
Definition at line 93 of file mitkWeakPointer.h.
Referenced by QmitkDataStorageTreeModel::GetDataStorage(), QmitkDataStorageTableModel::GetDataStorage(), QmitkDataStorageComboBox::GetDataStorage(), QmitkPropertyItemModel::GetPropertyList(), QmitkPropertiesTableModel::GetPropertyList(), QmitkPropertyItemModel::OnPreferencesChanged(), mitk::WeakPointer< mitk::DataInteractor >::operator=(), QmitkDataStorageTableModel::SetDataStorage(), QmitkDataStorageComboBox::SetDataStorage(), QmitkPropertyItemModel::SetPropertyList(), QmitkPropertyItemDelegate::SetPropertyList(), and QmitkPropertiesTableModel::SetPropertyList().
|
inline |
Test if the pointer has been initialized
Definition at line 103 of file mitkWeakPointer.h.
Referenced by QmitkDataStorageTreeModel::dropMimeData(), mitk::PlaneGeometryDataVtkMapper3D::GenerateDataForRenderer(), QmitkPropertyItemModel::OnPreferencesChanged(), QmitkDataStorageTableModel::Reset(), QmitkDataStorageComboBox::Reset(), QmitkPropertiesTableModel::Reset(), QmitkDataStorageTableModel::SetDataStorage(), QmitkDataStorageTreeModel::SetDataStorage(), QmitkDataStorageComboBox::SetDataStorage(), QmitkPointListViewWidget::SetPointSet(), QmitkPropertiesTableModel::SetPropertyList(), QmitkDataStorageTreeModel::Update(), and QmitkDataStorageComboBox::~QmitkDataStorageComboBox().
|
inline |
Definition at line 104 of file mitkWeakPointer.h.
Referenced by QmitkDataStorageTreeModel::AddNode(), QmitkPointListViewWidget::keyPressEvent(), mitkWeakPointerTest(), QmitkPointListViewWidget::MoveSelectedPointDown(), QmitkPointListViewWidget::MoveSelectedPointUp(), QmitkPointListViewWidget::RemoveSelectedPoint(), and QmitkPointListViewWidget::Update().
|
inline |
Gets called when the object is deleted or modified.
Definition at line 127 of file mitkWeakPointer.h.
|
inline |
Definition at line 139 of file mitkWeakPointer.h.
|
inline |
Return pointer to object.
Definition at line 79 of file mitkWeakPointer.h.
|
inline |
Definition at line 87 of file mitkWeakPointer.h.
|
inline |
Overload operator ->.
Definition at line 77 of file mitkWeakPointer.h.
|
inline |
Comparison of pointers. Less than comparison.
Definition at line 95 of file mitkWeakPointer.h.
|
inline |
Comparison of pointers. Less than or equal to comparison.
Definition at line 99 of file mitkWeakPointer.h.
|
inline |
Overload operator assignment.
Definition at line 106 of file mitkWeakPointer.h.
Referenced by mitk::WeakPointer< mitk::DataInteractor >::operator=().
|
inline |
Overload operator assignment.
Definition at line 108 of file mitkWeakPointer.h.
|
inline |
Template comparison operators.
Definition at line 82 of file mitkWeakPointer.h.
|
inline |
Comparison of pointers. Greater than comparison.
Definition at line 97 of file mitkWeakPointer.h.
|
inline |
Comparison of pointers. Greater than or equal to comparison.
Definition at line 101 of file mitkWeakPointer.h.
|
inline |
Function to print object pointed to.
Definition at line 117 of file mitkWeakPointer.h.
itkObjectEvent mitk::WeakPointer< TObjectType >::ObjectDelete |
AddEvent is emitted when the object pointed to gets deleted.
Definition at line 47 of file mitkWeakPointer.h.
Referenced by QmitkDataStorageTreeModel::SetDataStorage(), QmitkPointListViewWidget::SetPointSet(), and QmitkPropertiesTableModel::SetPropertyList().
itkObjectEvent mitk::WeakPointer< TObjectType >::ObjectModified |
AddEvent is emitted when the object pointed to gets modified.
Definition at line 51 of file mitkWeakPointer.h.
Referenced by QmitkPointListViewWidget::SetPointSet().