17 #ifndef mitkUShortPropertySerializer_h_included
18 #define mitkUShortPropertySerializer_h_included
26 class UShortPropertySerializer :
public BasePropertySerializer
30 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
32 virtual TiXmlElement *Serialize()
override
34 if (
const UShortProperty *prop = dynamic_cast<const UShortProperty *>(m_Property.GetPointer()))
36 auto element =
new TiXmlElement(
"unsigned");
37 element->SetAttribute(
"value", static_cast<unsigned short>(prop->GetValue()));
50 if (element->QueryUnsignedAttribute(
"value", &value) == TIXML_SUCCESS)
61 UShortPropertySerializer() {}
62 virtual ~UShortPropertySerializer() {}
MITK_REGISTER_SERIALIZER(UShortPropertySerializer)
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
#define mitkClassMacro(className, SuperClassName)