23 m_ValueType(DT_UNINIZIALIZED)
31 m_ValueType = DT_BOOL;
37 m_ValueType = DT_UINT;
48 m_DoubleValue = value;
54 m_StringValue = value;
55 m_ValueType = DT_STRING;
61 m_ValueType = DT_GROUP;
66 m_GroupValue[id] = value;
67 m_ValueType = DT_GROUP;
74 case DT_UNINIZIALIZED:
87 return (m_DoubleValue > 1 || m_DoubleValue < -1);
90 return (m_StringValue !=
"0");
93 mitkThrow() <<
"Cannot convert group data to bool";
104 std::istringstream ss(m_StringValue);
109 case DT_UNINIZIALIZED:
122 return m_DoubleValue;
128 mitkThrow() <<
"Cannot convert group data to bool";
139 std::istringstream ss(m_StringValue);
144 case DT_UNINIZIALIZED:
157 return m_DoubleValue;
163 mitkThrow() <<
"Cannot convert group data to bool";
174 std::istringstream ss(m_StringValue);
179 case DT_UNINIZIALIZED:
192 return m_DoubleValue > 1;
198 mitkThrow() <<
"Cannot convert group data to bool";
209 std::ostringstream strs;
213 case DT_UNINIZIALIZED:
226 strs << m_DoubleValue;
229 return m_StringValue;
232 mitkThrow() <<
"Cannot convert group data to bool";
243 if (m_ValueType != DT_GROUP)
244 mitkThrow() <<
"No Group Data, cannot convert to String Vector";
246 std::vector<std::string> result;
247 for (
auto iter = m_GroupValue.begin(); iter != m_GroupValue.end(); ++iter)
249 result.push_back((*iter).second.AsString());
256 return m_GroupValue[id];
262 return this->AsBool();
273 return this->AsUnsignedInt();
284 return this->AsInt();
295 return this->AsDouble();
306 return this->AsString();
ConfigurationHolder & At(std::string id)
void SetDouble(double value)
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
std::vector< std::string > AsStringVector()
void AddToGroup(std::string id, const ConfigurationHolder &value)
void SetString(std::string value)
unsigned int AsUnsignedInt()
void SetUnsignedInt(unsigned int value)