13 #ifndef mitkTemporoSpatialStringPropertySerializer_h_included 14 #define mitkTemporoSpatialStringPropertySerializer_h_included 22 class TemporoSpatialStringPropertySerializer :
public BasePropertySerializer
25 mitkClassMacro(TemporoSpatialStringPropertySerializer, BasePropertySerializer);
26 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
28 TiXmlElement *Serialize()
override 30 if (
const TemporoSpatialStringProperty *prop =
31 dynamic_cast<const TemporoSpatialStringProperty *>(m_Property.GetPointer()))
33 auto element =
new TiXmlElement(
"temporo_spatial_string");
35 TiXmlText text(content.c_str());
36 element->InsertEndChild(text);
47 const char *s(element->GetText());
48 std::string content = s ? s :
"";
53 TemporoSpatialStringPropertySerializer() {}
54 ~TemporoSpatialStringPropertySerializer()
override {}
MITKCORE_EXPORT::std::string serializeTemporoSpatialStringPropertyToJSON(const mitk::BaseProperty *prop)
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
MITK_REGISTER_SERIALIZER(TemporoSpatialStringPropertySerializer)
#define mitkClassMacro(className, SuperClassName)
MITKCORE_EXPORT mitk::BaseProperty::Pointer deserializeJSONToTemporoSpatialStringProperty(const std::string &value)