Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PropertyDeserialization Class Reference

Implementation of the IPropertyDeserialization service interface. More...

#include <mitkPropertyDeserialization.h>

Inheritance diagram for mitk::PropertyDeserialization:
Collaboration diagram for mitk::PropertyDeserialization:

Public Member Functions

 PropertyDeserialization ()
 
virtual ~PropertyDeserialization ()
 
 PropertyDeserialization (const PropertyDeserialization &)=delete
 
PropertyDeserialization & operator= (const PropertyDeserialization &)=delete
 
itk::SmartPointer< BaseProperty > CreateInstance (const std::string &className) override
 Create a new instance of a registered property type. More...
 
- Public Member Functions inherited from mitk::IPropertyDeserialization
virtual ~IPropertyDeserialization ()
 
template<typename T , typename = std::enable_if_t<std::is_base_of_v<BaseProperty, T>>>
void RegisterProperty ()
 Register a custom property type for deserialization. More...
 

Protected Member Functions

void InternalRegisterProperty (const BaseProperty *property) override
 Register a property prototype for deserialization. More...
 

Detailed Description

Implementation of the IPropertyDeserialization service interface.

Maintains a registry of property type prototypes that can be used to create new property instances during deserialization based on class name strings.

See also
IPropertyDeserialization

Definition at line 28 of file mitkPropertyDeserialization.h.

Constructor & Destructor Documentation

◆ PropertyDeserialization() [1/2]

mitk::PropertyDeserialization::PropertyDeserialization ( )

◆ ~PropertyDeserialization()

virtual mitk::PropertyDeserialization::~PropertyDeserialization ( )
virtual

◆ PropertyDeserialization() [2/2]

mitk::PropertyDeserialization::PropertyDeserialization ( const PropertyDeserialization &  )
delete

Member Function Documentation

◆ CreateInstance()

itk::SmartPointer<BaseProperty> mitk::PropertyDeserialization::CreateInstance ( const std::string &  className)
overridevirtual

Create a new instance of a registered property type.

Uses the stored prototype to create a new instance via CreateAnother().

Parameters
classNameThe class name of the property type to instantiate.
Returns
A new property instance, or nullptr if the class name is not registered.

Implements mitk::IPropertyDeserialization.

◆ InternalRegisterProperty()

void mitk::PropertyDeserialization::InternalRegisterProperty ( const BaseProperty *  property)
overrideprotectedvirtual

Register a property prototype for deserialization.

Parameters
propertyThe property prototype to register (keyed by its class name).

Implements mitk::IPropertyDeserialization.

◆ operator=()

PropertyDeserialization& mitk::PropertyDeserialization::operator= ( const PropertyDeserialization &  )
delete

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