|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Base class for objects that serialize and deserialize BaseProperty types to/from XML. More...
#include <mitkBasePropertySerializer.h>


Public Member Functions | |
| mitkClassMacroItkParent (BasePropertySerializer, itk::Object) | |
| virtual void | SetProperty (const BaseProperty *_arg) |
| Sets the property to be serialized. More... | |
| virtual tinyxml2::XMLElement * | Serialize (tinyxml2::XMLDocument &doc) |
| Serializes the previously set BaseProperty object into an XML element. More... | |
| virtual BaseProperty::Pointer | Deserialize (const tinyxml2::XMLElement *element) |
| Deserializes an XML element back into a BaseProperty object. More... | |
Protected Member Functions | |
| BasePropertySerializer () | |
| ~BasePropertySerializer () override | |
Protected Attributes | |
| BaseProperty::ConstPointer | m_Property |
Base class for objects that serialize and deserialize BaseProperty types to/from XML.
Provides the interface for converting mitk::BaseProperty-derived objects to and from XML elements (using TinyXML2). Sub-classes implement the actual serialization and deserialization logic for specific property types.
The naming convention for sub-classes must follow this pattern:
* If the class derived from BaseProperty is called GreenProperty * Then the serializer for this class must be called GreenPropertySerializer *
Sub-classes are discovered at runtime through the ITK object factory mechanism. Use the MITK_REGISTER_SERIALIZER macro to register a new serializer.
Definition at line 48 of file mitkBasePropertySerializer.h.
|
protected |
|
overrideprotected |
|
virtual |
Deserializes an XML element back into a BaseProperty object.
The base implementation logs an error and returns nullptr. Sub-classes must override this method to reconstruct a property from XML.
| [in] | element | The XML element to deserialize. May be nullptr. |
Reimplemented in mitk::VectorPropertySerializer< DATATYPE >, mitk::TransferFunctionPropertySerializer, mitk::LookupTablePropertySerializer, and mitk::ScalarListLookupTablePropertySerializer.
| mitk::BasePropertySerializer::mitkClassMacroItkParent | ( | BasePropertySerializer | , |
| itk::Object | |||
| ) |
|
virtual |
Serializes the previously set BaseProperty object into an XML element.
The base implementation logs the request and returns nullptr. Sub-classes must override this method to produce a meaningful XML representation.
| [in,out] | doc | The XML document used to create new elements. |
Reimplemented in mitk::VectorPropertySerializer< DATATYPE >, mitk::TransferFunctionPropertySerializer, mitk::LookupTablePropertySerializer, mitk::EnumerationPropertySerializer, and mitk::ScalarListLookupTablePropertySerializer.
|
virtual |
Sets the property to be serialized.
| [in] | _arg | Pointer to the BaseProperty object. |
|
protected |
Definition at line 89 of file mitkBasePropertySerializer.h.