13 #ifndef mitkPropertyList_h
14 #define mitkPropertyList_h
19 #include <nlohmann/json_fwd.hpp>
64 itkFactorylessNewMacro(
Self);
71 typedef std::map<std::string, BaseProperty::Pointer>
PropertyMap;
76 std::vector<std::string> GetPropertyKeys(
const std::string &contextName =
"",
bool includeDefaultContext =
false)
const override;
77 std::vector<std::string> GetPropertyContextNames()
const override;
80 BaseProperty * GetNonConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
override;
81 void SetProperty(
const std::string &propertyKey,
BaseProperty *property,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
82 void RemoveProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
97 void ReplaceProperty(
const std::string &propertyKey,
BaseProperty *property);
108 template <
typename T>
123 bool GetBoolProperty(
const char *propertyKey,
bool &boolValue)
const;
127 bool Get(
const char *propertyKey,
bool &boolValue)
const;
132 void SetBoolProperty(
const char *propertyKey,
bool boolValue);
136 void Set(
const char *propertyKey,
bool boolValue);
141 bool GetIntProperty(
const char *propertyKey,
int &intValue)
const;
145 bool Get(
const char *propertyKey,
int &intValue)
const;
150 void SetIntProperty(
const char *propertyKey,
int intValue);
154 void Set(
const char *propertyKey,
int intValue);
159 bool GetFloatProperty(
const char *propertyKey,
float &floatValue)
const;
163 bool Get(
const char *propertyKey,
float &floatValue)
const;
168 void SetFloatProperty(
const char *propertyKey,
float floatValue);
172 void Set(
const char *propertyKey,
float floatValue);
177 bool GetDoubleProperty(
const char *propertyKey,
double &doubleValue)
const;
181 bool Get(
const char *propertyKey,
double &doubleValue)
const;
186 void SetDoubleProperty(
const char *propertyKey,
double doubleValue);
190 void Set(
const char *propertyKey,
double doubleValue);
195 bool GetStringProperty(
const char *propertyKey, std::string &stringValue)
const;
199 bool Get(
const char *propertyKey, std::string &stringValue)
const;
204 void SetStringProperty(
const char *propertyKey,
const char *stringValue);
208 void Set(
const char *propertyKey,
const char *stringValue);
212 void Set(
const char *propertyKey,
const std::string &stringValue);
218 itk::ModifiedTimeType GetMTime()
const override;
223 bool DeleteProperty(
const std::string &propertyKey);
226 bool IsEmpty()
const {
return m_Properties.empty(); }
227 virtual void Clear();
263 itk::LightObject::Pointer InternalClone()
const override;