13 #ifndef mitkGenericProperty_h
14 #define mitkGenericProperty_h
28 #pragma warning(disable : 4522)
54 itkSetMacro(Value, T);
55 itkGetConstMacro(Value, T);
59 std::stringstream myStr;
64 using BaseProperty::operator=;
76 itk::LightObject::Pointer InternalClone()
const override
78 itk::LightObject::Pointer result(
new Self(*
this));
85 return (this->m_Value ==
static_cast<const Self &
>(other).m_Value);
88 bool Assign(
const BaseProperty &other)
override
90 this->m_Value =
static_cast<const Self &
>(other).m_Value;
109 #define mitkDeclareGenericProperty(PropertyName, Type, Export) \
111 class Export PropertyName : public GenericProperty<Type> \
115 mitkClassMacro(PropertyName, GenericProperty<Type>); \
116 itkFactorylessNewMacro(Self); \
117 itkCloneMacro(Self); \
118 mitkNewMacro1Param(PropertyName, Type); \
120 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(); \