Property containing a weak (non-owning) pointer to an itk::Object.
More...
#include <mitkWeakPointerProperty.h>
|
| typedef itk::WeakPointer< itk::Object > | ValueType |
| | The type of the value stored by this property. More...
|
| |
Property containing a weak (non-owning) pointer to an itk::Object.
Unlike SmartPointerProperty, this property does not prevent the referenced object from being deleted. The weak pointer becomes invalid if the referenced object is destroyed.
- Note
- This property does not support JSON serialization. ToJSON() and FromJSON() return
false.
- See also
- BaseProperty
-
SmartPointerProperty
Definition at line 35 of file mitkWeakPointerProperty.h.
◆ ValueType
◆ ~WeakPointerProperty()
| mitk::WeakPointerProperty::~WeakPointerProperty |
( |
| ) |
|
|
override |
◆ WeakPointerProperty() [1/2]
◆ WeakPointerProperty() [2/2]
| mitk::WeakPointerProperty::WeakPointerProperty |
( |
itk::Object * |
pointer = nullptr | ) |
|
|
protected |
◆ Clone()
| Pointer mitk::WeakPointerProperty::Clone |
( |
| ) |
const |
◆ FromJSON()
◆ GetValue()
| ValueType mitk::WeakPointerProperty::GetValue |
( |
| ) |
const |
Get the stored weak pointer (alias for GetWeakPointer()).
- Returns
- The itk::WeakPointer value.
◆ GetValueAsString()
| std::string mitk::WeakPointerProperty::GetValueAsString |
( |
| ) |
const |
|
overridevirtual |
Return the pointer address as a string.
- Returns
- A string representation of the pointer address.
Reimplemented from mitk::BaseProperty.
◆ GetWeakPointer()
| ValueType mitk::WeakPointerProperty::GetWeakPointer |
( |
| ) |
const |
Get the stored weak pointer.
- Returns
- The itk::WeakPointer value.
◆ mitkClassMacro()
◆ mitkCloneMacro()
◆ mitkNewMacro1Param()
◆ New()
| static Pointer mitk::WeakPointerProperty::New |
( |
| ) |
|
|
static |
◆ operator=()
Assign a property value to this instance.
Performs a polymorphic assignment from the given property. The assignment succeeds only if the source and target properties are of the same type. The subclass-specific Assign() method is called to perform the actual value copy.
Subclasses must implement Assign(const BaseProperty&) and call the superclass Assign method for proper handling. The copy assignment operator of the subclass should be disabled and the base class operator should be made visible using "using" statements.
- Parameters
-
| [in] | property | The property whose value should be assigned to this instance. |
- Returns
- A reference to this property.
- See also
- AssignProperty
-
Assign
◆ SetValue()
| void mitk::WeakPointerProperty::SetValue |
( |
const ValueType & |
value | ) |
|
Set the stored weak pointer (alias for SetWeakPointer()).
- Parameters
-
| [in] | value | The itk::WeakPointer value to set. |
◆ SetWeakPointer()
| void mitk::WeakPointerProperty::SetWeakPointer |
( |
itk::Object * |
pointer | ) |
|
Set the stored weak pointer.
- Parameters
-
| [in] | pointer | The itk::Object to point to, or nullptr. |
◆ ToJSON()
◆ m_WeakPointer
| itk::WeakPointer<itk::Object> mitk::WeakPointerProperty::m_WeakPointer |
|
protected |
The documentation for this class was generated from the following file: