13 #ifndef mitkUShortPropertySerializer_h_included 14 #define mitkUShortPropertySerializer_h_included 22 class UShortPropertySerializer :
public BasePropertySerializer
26 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
28 TiXmlElement *Serialize()
override 30 if (
const UShortProperty *prop = dynamic_cast<const UShortProperty *>(m_Property.GetPointer()))
32 auto element =
new TiXmlElement(
"unsigned");
33 element->SetAttribute(
"value", static_cast<unsigned short>(prop->GetValue()));
46 if (element->QueryUnsignedAttribute(
"value", &value) == TIXML_SUCCESS)
57 UShortPropertySerializer() {}
58 ~UShortPropertySerializer()
override {}
MITK_REGISTER_SERIALIZER(UShortPropertySerializer)
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
#define mitkClassMacro(className, SuperClassName)