14 #ifndef mitkConfigurationHolder_h
15 #define mitkConfigurationHolder_h
199 unsigned int m_UIntValue;
201 double m_DoubleValue;
202 std::string m_StringValue;
204 std::map<std::string, ConfigurationHolder> m_GroupValue;
#define MITKCLCORE_EXPORT
A variant-like container for storing typed configuration values.
std::string AsString(std::string value)
Convert the stored value to string, returning a default on failure.
int AsInt(int value)
Convert the stored value to int, returning a default on failure.
unsigned int AsUnsignedInt()
Convert the stored value to unsigned int.
ConfigurationHolder()
Construct an uninitialized ConfigurationHolder.
void SetInt(int value)
Store a signed integer value.
bool AsBool()
Convert the stored value to bool.
int AsInt()
Convert the stored value to int.
void ClearGroup()
Clear all children from the group and set the type to DT_GROUP.
unsigned int AsUnsignedInt(unsigned int value)
Convert the stored value to unsigned int, returning a default on failure.
double AsDouble(double value)
Convert the stored value to double, returning a default on failure.
ValueType
Enumerates the data types that a ConfigurationHolder can store.
@ DT_DOUBLE
Double-precision floating-point value.
@ DT_UNINIZIALIZED
No value has been set yet.
@ DT_UINT
Unsigned integer value.
@ DT_INT
Signed integer value.
void SetDouble(double value)
Store a double-precision floating-point value.
void AddToGroup(std::string id, const ConfigurationHolder &value)
Add a named child to the group.
void SetBool(bool value)
Store a boolean value.
std::vector< std::string > AsStringVector()
Convert group children to a vector of strings.
bool AsBool(bool value)
Convert the stored value to bool, returning a default on failure.
double AsDouble()
Convert the stored value to double.
void SetString(std::string value)
Store a string value.
void SetUnsignedInt(unsigned int value)
Store an unsigned integer value.
std::string AsString()
Convert the stored value to string.
ConfigurationHolder & At(std::string id)
Access a child ConfigurationHolder by identifier.
Find image slices visible on a given plane.