Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::IPropertyDeserialization Class Referenceabstract

Interface of property deserialization service. More...

#include <mitkIPropertyDeserialization.h>

Inheritance diagram for mitk::IPropertyDeserialization:

Public Member Functions

virtual ~IPropertyDeserialization ()
 
virtual BaseProperty::Pointer CreateInstance (const std::string &className)=0
 Create a new instance of a registered property type by class name. More...
 
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

virtual void InternalRegisterProperty (const BaseProperty *property)=0
 Internal method to register a property instance for deserialization. More...
 

Detailed Description

Interface of property deserialization service.

This service allows you to register custom property types (derived from BaseProperty) for deserialization. If a property type is not registered, it cannot be deserialized, e.g. when deserializing a PropertyList.

Definition at line 34 of file mitkIPropertyDeserialization.h.

Constructor & Destructor Documentation

◆ ~IPropertyDeserialization()

virtual mitk::IPropertyDeserialization::~IPropertyDeserialization ( )
virtual

Member Function Documentation

◆ CreateInstance()

virtual BaseProperty::Pointer mitk::IPropertyDeserialization::CreateInstance ( const std::string &  className)
pure virtual

Create a new instance of a registered property type by class name.

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

Implemented in mitk::PropertyDeserialization.

◆ InternalRegisterProperty()

virtual void mitk::IPropertyDeserialization::InternalRegisterProperty ( const BaseProperty *  property)
protectedpure virtual

Internal method to register a property instance for deserialization.

Called by the public RegisterProperty() template method.

Parameters
propertyA prototype instance of the property type to register.

Implemented in mitk::PropertyDeserialization.

◆ RegisterProperty()

template<typename T , typename = std::enable_if_t<std::is_base_of_v<BaseProperty, T>>>
void mitk::IPropertyDeserialization::RegisterProperty ( )
inline

Register a custom property type for deserialization.

The module activator of the module defining a property type is a good location to register custom property types of that module. See the implementation of MitkCoreActivator for examples.

Definition at line 54 of file mitkIPropertyDeserialization.h.


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