17 #ifndef MITKGENERICPROPERTY_H_HEADER_INCLUDED_C1061CEE
18 #define MITKGENERICPROPERTY_H_HEADER_INCLUDED_C1061CEE
32 #pragma warning(disable : 4522)
58 itkSetMacro(Value, T);
59 itkGetConstMacro(Value, T);
61 virtual
std::
string GetValueAsString()
const override
63 std::stringstream myStr;
68 using BaseProperty::operator=;
87 virtual bool IsEqual(
const BaseProperty &other)
const override
89 return (this->m_Value == static_cast<const Self &>(other).m_Value);
92 virtual bool Assign(
const BaseProperty &other)
override
94 this->m_Value =
static_cast<const Self &
>(other).m_Value;
113 #define mitkDeclareGenericProperty(PropertyName, Type, Export) \
115 class Export PropertyName : public GenericProperty<Type> \
119 mitkClassMacro(PropertyName, GenericProperty<Type>) itkFactorylessNewMacro(Self) itkCloneMacro(Self) \
120 mitkNewMacro1Param(PropertyName, Type) using BaseProperty::operator=; \
124 PropertyName(const PropertyName &); \
125 PropertyName(Type x); \
128 itk::LightObject::Pointer InternalClone() const override; \
131 #define mitkDefineGenericProperty(PropertyName, Type, DefaultValue) \
132 mitk::PropertyName::PropertyName() : Superclass(DefaultValue) {} \
133 mitk::PropertyName::PropertyName(const PropertyName &other) : GenericProperty<Type>(other) {} \
134 mitk::PropertyName::PropertyName(Type x) : Superclass(x) {} \
135 itk::LightObject::Pointer mitk::PropertyName::InternalClone() const \
137 itk::LightObject::Pointer result(new Self(*this)); \
138 result->UnRegister(); \
itk::SmartPointer< Self > Pointer
#define mitkNewMacro1Param(classname, type)
GenericProperty(const GenericProperty &other)
DataCollection - Class to facilitate loading/accessing structured data.
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)