13 #ifndef PROPERTYLIST_H_HEADER_INCLUDED_C1C77D8D 14 #define PROPERTYLIST_H_HEADER_INCLUDED_C1C77D8D 22 #include <itkObjectFactory.h> 72 itkFactorylessNewMacro(
Self);
79 typedef std::map<std::string, BaseProperty::Pointer>
PropertyMap;
83 BaseProperty::ConstPointer GetConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
const override;
84 std::vector<std::string> GetPropertyKeys(
const std::string &contextName =
"",
bool includeDefaultContext =
false)
const override;
85 std::vector<std::string> GetPropertyContextNames()
const override;
88 BaseProperty * GetNonConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
override;
89 void SetProperty(
const std::string &propertyKey,
BaseProperty *property,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
90 void RemoveProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
105 void ReplaceProperty(
const std::string &propertyKey,
BaseProperty *property);
116 template <
typename T>
131 bool GetBoolProperty(
const char *propertyKey,
bool &boolValue)
const;
135 bool Get(
const char *propertyKey,
bool &boolValue)
const;
140 void SetBoolProperty(
const char *propertyKey,
bool boolValue);
144 void Set(
const char *propertyKey,
bool boolValue);
149 bool GetIntProperty(
const char *propertyKey,
int &
intValue)
const;
153 bool Get(
const char *propertyKey,
int &intValue)
const;
158 void SetIntProperty(
const char *propertyKey,
int intValue);
162 void Set(
const char *propertyKey,
int intValue);
167 bool GetFloatProperty(
const char *propertyKey,
float &floatValue)
const;
171 bool Get(
const char *propertyKey,
float &floatValue)
const;
176 void SetFloatProperty(
const char *propertyKey,
float floatValue);
180 void Set(
const char *propertyKey,
float floatValue);
185 bool GetDoubleProperty(
const char *propertyKey,
double &doubleValue)
const;
189 bool Get(
const char *propertyKey,
double &doubleValue)
const;
194 void SetDoubleProperty(
const char *propertyKey,
double doubleValue);
198 void Set(
const char *propertyKey,
double doubleValue);
203 bool GetStringProperty(
const char *propertyKey, std::string &
stringValue)
const;
207 bool Get(
const char *propertyKey, std::string &stringValue)
const;
212 void SetStringProperty(
const char *propertyKey,
const char *stringValue);
216 void Set(
const char *propertyKey,
const char *stringValue);
220 void Set(
const char *propertyKey,
const std::string &stringValue);
226 unsigned long GetMTime()
const override;
231 bool DeleteProperty(
const std::string &propertyKey);
233 const PropertyMap *
GetMap()
const {
return &m_Properties; }
234 bool IsEmpty()
const {
return m_Properties.empty(); }
235 virtual void Clear();
249 itk::LightObject::Pointer InternalClone()
const override;
std::pair< std::string, BaseProperty::Pointer > PropertyMapElementType
DataCollection - Class to facilitate loading/accessing structured data.
Key-value list holding instances of BaseProperty.
virtual T GetValue() const
bool GetPropertyValue(const char *propertyKey, T &value) const
Convenience access method for GenericProperty<T> properties (T being the type of the second parameter...
Abstract base class for properties.
std::map< std::string, BaseProperty::Pointer > PropertyMap
#define mitkClassMacroItkParent(className, SuperClassName)
PropertyMap m_Properties
Map of properties.
static const char * replace[]
This is a dictionary to replace long names of classes, modules, etc. to shorter versions in the conso...
const PropertyMap * GetMap() const