40 #ifndef __OPENFLUID_CORE_MAPVALUE_HPP__ 41 #define __OPENFLUID_CORE_MAPVALUE_HPP__ 138 typedef std::map<std::string,std::shared_ptr<Value> >
Map_t;
177 void writeToStream(std::ostream& OutStm)
const;
180 { writeToStream(OutStm); }
187 void set(
const std::string& Key,
Value* Element);
194 inline void setDouble(
const std::string& Key,
const double& Val)
203 inline void setInteger(
const std::string& Key,
const long& Val)
211 inline void setBoolean(
const std::string& Key,
const bool& Val)
219 inline void setString(
const std::string& Key,
const std::string& Val)
250 Value& operator[](
const std::string& Key);
257 Value& at(
const std::string& Key);
264 const Value& at(
const std::string& Key)
const;
295 inline std::string
getString(
const std::string& Key)
const 326 bool remove(
const std::string& Key);
333 {
return m_Value.size(); }
340 {
return m_Value.size(); }
348 {
return (m_Value.find(Key) != m_Value.end()); }
354 std::vector<std::string> getKeys()
const;
366 {
return m_Value.begin(); }
373 {
return m_Value.begin(); }
380 {
return m_Value.end(); }
386 inline const_iterator
end()
const 387 {
return m_Value.end(); }
const StringValue & asStringValue() const
void writeQuotedToStream(std::ostream &OutStm) const
Definition: MapValue.hpp:179
void setVectorValue(const std::string &Key, const VectorValue &Val)
Definition: MapValue.hpp:227
Definition: BooleanValue.hpp:103
Value * clone() const
Definition: MapValue.hpp:174
MatrixValue getMatrixValue(const std::string &Key) const
Definition: MapValue.hpp:311
Definition: VectorValue.hpp:118
void setMapValue(const std::string &Key, const MapValue &Val)
Definition: MapValue.hpp:243
VectorValue getVectorValue(const std::string &Key) const
Definition: MapValue.hpp:303
MapValue getMapValue(const std::string &Key) const
Definition: MapValue.hpp:319
Definition: CompoundValue.hpp:50
bool isKeyExist(const std::string &Key) const
Definition: MapValue.hpp:347
std::string get() const
Definition: StringValue.hpp:175
const VectorValue & asVectorValue() const
double getDouble(const std::string &Key) const
Definition: MapValue.hpp:271
Type getType() const
Definition: MapValue.hpp:171
const IntegerValue & asIntegerValue() const
Definition: MapValue.hpp:134
const DoubleValue & asDoubleValue() const
unsigned long getSize() const
Definition: MapValue.hpp:332
std::string getString(const std::string &Key) const
Definition: MapValue.hpp:295
Definition: IntegerValue.hpp:105
const_iterator end() const
Definition: MapValue.hpp:386
const BooleanValue & asBooleanValue() const
const_iterator begin() const
Definition: MapValue.hpp:372
Map_t::const_iterator const_iterator
Definition: MapValue.hpp:142
long get() const
Definition: IntegerValue.hpp:154
bool getBoolean(const std::string &Key) const
Definition: MapValue.hpp:287
Type
Definition: Value.hpp:68
long getInteger(const std::string &Key) const
Definition: MapValue.hpp:279
double get() const
Definition: DoubleValue.hpp:151
unsigned long size() const
Definition: MapValue.hpp:339
iterator begin()
Definition: MapValue.hpp:365
Definition: ApplicationException.hpp:47
bool get() const
Definition: BooleanValue.hpp:152
const MatrixValue & asMatrixValue() const
const MapValue & asMapValue() const
MapValue(const Map_t &Val)
Definition: MapValue.hpp:163
#define OPENFLUID_API
Definition: dllexport.hpp:87
void setBoolean(const std::string &Key, const bool &Val)
Definition: MapValue.hpp:211
void setMatrixValue(const std::string &Key, const MatrixValue &Val)
Definition: MapValue.hpp:235
void setDouble(const std::string &Key, const double &Val)
Definition: MapValue.hpp:194
void setString(const std::string &Key, const std::string &Val)
Definition: MapValue.hpp:219
Map_t::iterator iterator
Definition: MapValue.hpp:140
Definition: DoubleValue.hpp:102
Definition: MatrixValue.hpp:114
std::map< std::string, std::shared_ptr< Value > > Map_t
Definition: MapValue.hpp:138
Definition: StringValue.hpp:91
iterator end()
Definition: MapValue.hpp:379
MapValue()
Definition: MapValue.hpp:155
void setInteger(const std::string &Key, const long &Val)
Definition: MapValue.hpp:203