41 #ifndef __MAPVALUE_HPP__
42 #define __MAPVALUE_HPP__
46 #include <boost/shared_ptr.hpp>
58 namespace openfluid {
namespace core {
137 typedef std::map<std::string,boost::shared_ptr<Value> >
Map_t;
166 void writeToStream(std::ostream& OutStm)
const;
173 void set(
const std::string& Key,
Value* Element);
180 inline void setDouble(
const std::string& Key,
const double& Val)
189 inline void setInteger(
const std::string& Key,
const long& Val)
197 inline void setBoolean(
const std::string& Key,
const bool& Val)
205 inline void setString(
const std::string& Key,
const std::string& Val)
228 Value& operator[](
const std::string& Key);
235 Value&
get(
const std::string& Key);
242 inline double getDouble(
const std::string& Key) {
return get(Key).asDoubleValue().get(); };
249 inline long getInteger(
const std::string& Key) {
return get(Key).asIntegerValue().get(); };
256 inline bool getBoolean(
const std::string& Key) {
return get(Key).asBooleanValue().get(); };
263 inline std::string
getString(
const std::string& Key) {
return get(Key).asStringValue().get(); };
283 bool remove(
const std::string& Key);
289 inline unsigned long getSize()
const {
return m_Value.size(); };
295 unsigned long size()
const {
return m_Value.size(); };
302 inline bool isKeyExist(
const std::string& Key)
const {
return (m_Value.find(Key) != m_Value.end()); };
double getDouble(const std::string &Key)
Definition: MapValue.hpp:242
VectorValue getVectorValue(const std::string &Key)
Definition: MapValue.hpp:270
void setDouble(const std::string &Key, const double &Val)
Definition: MapValue.hpp:180
bool getBoolean(const std::string &Key)
Definition: MapValue.hpp:256
Definition: StringValue.hpp:91
Definition: CompoundValue.hpp:53
void setInteger(const std::string &Key, const long &Val)
Definition: MapValue.hpp:189
MapValue()
Definition: MapValue.hpp:149
bool isKeyExist(const std::string &Key) const
Definition: MapValue.hpp:302
Value * clone() const
Definition: MapValue.hpp:164
Type getType() const
Definition: MapValue.hpp:162
Definition: IntegerValue.hpp:106
Definition: DoubleValue.hpp:103
Definition: MapValue.hpp:134
unsigned long getSize() const
Definition: MapValue.hpp:289
MatrixValue getMatrixValue(const std::string &Key)
Definition: MapValue.hpp:277
void setBoolean(const std::string &Key, const bool &Val)
Definition: MapValue.hpp:197
Type
Definition: Value.hpp:68
void setString(const std::string &Key, const std::string &Val)
Definition: MapValue.hpp:205
Definition: MatrixValue.hpp:115
unsigned long size() const
Definition: MapValue.hpp:295
void setMatrixValue(const std::string &Key, const MatrixValue &Val)
Definition: MapValue.hpp:221
MapValue(const Map_t &Val)
Definition: MapValue.hpp:156
std::string getString(const std::string &Key)
Definition: MapValue.hpp:263
long getInteger(const std::string &Key)
Definition: MapValue.hpp:249
Definition: VectorValue.hpp:119
void setVectorValue(const std::string &Key, const VectorValue &Val)
Definition: MapValue.hpp:213
Definition: BooleanValue.hpp:104
std::map< std::string, boost::shared_ptr< Value > > Map_t
Definition: MapValue.hpp:137
#define DLLEXPORT
Definition: dllexport.hpp:51