17 #ifndef mitkBoolPropertySerializer_h_included
18 #define mitkBoolPropertySerializer_h_included
26 class BoolPropertySerializer :
public BasePropertySerializer
30 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
32 virtual TiXmlElement *Serialize()
override
34 if (
const BoolProperty *prop = dynamic_cast<const BoolProperty *>(m_Property.GetPointer()))
36 auto element =
new TiXmlElement(
"bool");
37 if (prop->GetValue() ==
true)
39 element->SetAttribute(
"value",
"true");
43 element->SetAttribute(
"value",
"false");
55 return BoolProperty::New(std::string(element->Attribute(
"value")) ==
"true").GetPointer();
59 BoolPropertySerializer() {}
60 virtual ~BoolPropertySerializer() {}
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
MITK_REGISTER_SERIALIZER(BoolPropertySerializer)
#define mitkClassMacro(className, SuperClassName)