Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::SmartPointerProperty Class Reference

Property containing a smart-pointer. More...

#include <mitkSmartPointerProperty.h>

Inheritance diagram for mitk::SmartPointerProperty:
Collaboration diagram for mitk::SmartPointerProperty:

Public Types

typedef SmartPointerProperty Self
 
typedef BaseProperty Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Object::Pointer ValueType
 
- Public Types inherited from mitk::BaseProperty
typedef BaseProperty Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
itk::Object::Pointer GetSmartPointer () const
 
ValueType GetValue () const
 
void SetSmartPointer (itk::Object *)
 
void SetValue (const ValueType &)
 
std::string GetValueAsString () const override
 mainly for XML output More...
 
bool ToJSON (nlohmann::json &j) const override
 Serialize property value(s) to JSON. More...
 
bool FromJSON (const nlohmann::json &j) override
 Deserialize property value(s) from JSON. More...
 
BasePropertyoperator= (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 
- Public Member Functions inherited from mitk::BaseProperty
Pointer Clone () const
 
bool operator== (const BaseProperty &property) const
 Subclasses must implement IsEqual(const BaseProperty&) to support comparison. More...
 
BasePropertyoperator= (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 
bool AssignProperty (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
static Pointer New (itk::Object *_arg)
 
static void PostProcessXMLReading ()
 
static unsigned int GetReferenceCountFor (itk::Object *)
 Return the number of SmartPointerProperties that reference the object given as parameter. More...
 
static std::string GetReferenceUIDFor (itk::Object *)
 
static void RegisterPointerTarget (itk::Object *, const std::string uid)
 
- Static Public Member Functions inherited from mitk::BaseProperty
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 SmartPointerProperty (itk::Object *=nullptr)
 
 SmartPointerProperty (const SmartPointerProperty &)
 
- Protected Member Functions inherited from mitk::BaseProperty
 BaseProperty ()
 
 BaseProperty (const BaseProperty &other)
 
 ~BaseProperty () override
 

Protected Attributes

itk::Object::Pointer m_SmartPointer
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::BaseProperty
static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING
 Default return value if a property which can not be returned as string. More...
 

Detailed Description

Property containing a smart-pointer.

Definition at line 34 of file mitkSmartPointerProperty.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

◆ ValueType

typedef itk::Object::Pointer mitk::SmartPointerProperty::ValueType

Definition at line 40 of file mitkSmartPointerProperty.h.

Constructor & Destructor Documentation

◆ SmartPointerProperty() [1/2]

mitk::SmartPointerProperty::SmartPointerProperty ( itk::Object *  = nullptr)
protected

◆ SmartPointerProperty() [2/2]

mitk::SmartPointerProperty::SmartPointerProperty ( const SmartPointerProperty )
protected

Member Function Documentation

◆ Clone()

Pointer mitk::SmartPointerProperty::Clone ( ) const

◆ FromJSON()

bool mitk::SmartPointerProperty::FromJSON ( const nlohmann::json j)
overridevirtual

Deserialize property value(s) from JSON.

Rely on exceptions for error handling when implementing deserialization.

Returns
False if not deserializable by design, true otherwise.

Implements mitk::BaseProperty.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::SmartPointerProperty::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::BaseProperty.

Definition at line 37 of file mitkSmartPointerProperty.h.

◆ GetClassName()

virtual const char* mitk::SmartPointerProperty::GetClassName ( ) const
virtual

Reimplemented from mitk::BaseProperty.

◆ GetReferenceCountFor()

static unsigned int mitk::SmartPointerProperty::GetReferenceCountFor ( itk::Object *  )
static

Return the number of SmartPointerProperties that reference the object given as parameter.

◆ GetReferenceUIDFor()

static std::string mitk::SmartPointerProperty::GetReferenceUIDFor ( itk::Object *  )
static

◆ GetSmartPointer()

itk::Object::Pointer mitk::SmartPointerProperty::GetSmartPointer ( ) const

◆ GetStaticNameOfClass()

static const char* mitk::SmartPointerProperty::GetStaticNameOfClass ( )
inlinestatic

Definition at line 37 of file mitkSmartPointerProperty.h.

◆ GetValue()

ValueType mitk::SmartPointerProperty::GetValue ( ) const

◆ GetValueAsString()

std::string mitk::SmartPointerProperty::GetValueAsString ( ) const
overridevirtual

mainly for XML output

Reimplemented from mitk::BaseProperty.

◆ New() [1/2]

static Pointer mitk::SmartPointerProperty::New ( )
static

◆ New() [2/2]

static Pointer mitk::SmartPointerProperty::New ( itk::Object *  _arg)
inlinestatic

Definition at line 40 of file mitkSmartPointerProperty.h.

◆ operator=()

BaseProperty& mitk::BaseProperty::operator=

Assigns property to this BaseProperty instance.

Subclasses must implement Assign(const BaseProperty&) and call the superclass Assign method for proper handling of polymorphic assignments. The assignment operator of the subclass should be disabled and the baseclass operator should be made visible using "using" statements.

◆ PostProcessXMLReading()

static void mitk::SmartPointerProperty::PostProcessXMLReading ( )
static

◆ RegisterPointerTarget()

static void mitk::SmartPointerProperty::RegisterPointerTarget ( itk::Object *  ,
const std::string  uid 
)
static

◆ SetSmartPointer()

void mitk::SmartPointerProperty::SetSmartPointer ( itk::Object *  )

◆ SetValue()

void mitk::SmartPointerProperty::SetValue ( const ValueType )

◆ ToJSON()

bool mitk::SmartPointerProperty::ToJSON ( nlohmann::json j) const
overridevirtual

Serialize property value(s) to JSON.

Rely on exceptions for error handling when implementing serialization.

Returns
False if not serializable by design, true otherwise.

Implements mitk::BaseProperty.

Member Data Documentation

◆ m_SmartPointer

itk::Object::Pointer mitk::SmartPointerProperty::m_SmartPointer
protected

Definition at line 69 of file mitkSmartPointerProperty.h.


The documentation for this class was generated from the following file: