17 #ifndef mitkTemporoSpatialStringPropertySerializer_h_included
18 #define mitkTemporoSpatialStringPropertySerializer_h_included
26 class TemporoSpatialStringPropertySerializer :
public BasePropertySerializer
29 mitkClassMacro(TemporoSpatialStringPropertySerializer, BasePropertySerializer);
30 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
32 virtual TiXmlElement *Serialize()
override
34 if (
const TemporoSpatialStringProperty *prop =
35 dynamic_cast<const TemporoSpatialStringProperty *>(m_Property.GetPointer()))
37 auto element =
new TiXmlElement(
"temporo_spatial_string");
39 TiXmlText text(content.c_str());
40 element->InsertEndChild(text);
51 const char *s(element->GetText());
52 std::string content = s ? s :
"";
57 TemporoSpatialStringPropertySerializer() {}
58 virtual ~TemporoSpatialStringPropertySerializer() {}
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)