 |
Manual for OpenFLUID 2.1.11
|
Go to the documentation of this file.
40 #ifndef __OPENFLUID_CORE_MAPVALUE_HPP__
41 #define __OPENFLUID_CORE_MAPVALUE_HPP__
96 typedef std::map<std::string,std::shared_ptr<Value>>
Map_t;
149 void writeToStream(std::ostream& OutStm)
const override;
153 writeToStream(OutStm);
161 void set(
const std::string& Key,
Value* Element);
168 inline void setDouble(
const std::string& Key,
const double& Val)
179 inline void setInteger(
const std::string& Key,
const long& Val)
189 inline void setBoolean(
const std::string& Key,
const bool& Val)
199 inline void setString(
const std::string& Key,
const std::string& Val)
238 Value& operator[](
const std::string& Key);
245 Value& at(
const std::string& Key);
252 const Value& at(
const std::string& Key)
const;
261 return at(Key).asDoubleValue().get();
271 return at(Key).asIntegerValue().get();
281 return at(Key).asBooleanValue().get();
289 inline std::string
getString(
const std::string& Key)
const
291 return at(Key).asStringValue().get();
328 bool remove(
const std::string& Key);
336 return m_Value.size();
345 return m_Value.size();
355 return (m_Value.find(Key) != m_Value.end());
362 std::vector<std::string> getKeys()
const;
375 return m_Value.begin();
384 return m_Value.begin();
393 return m_Value.end();
402 return m_Value.end();
Definition: VectorValue.hpp:84
Definition: MatrixValue.hpp:84
iterator end()
Definition: MapValue.hpp:391
void setMapValue(const std::string &Key, const MapValue &Val)
Definition: MapValue.hpp:229
void setBoolean(const std::string &Key, const bool &Val)
Definition: MapValue.hpp:189
Definition: CompoundValue.hpp:51
double getDouble(const std::string &Key) const
Definition: MapValue.hpp:259
#define OPENFLUID_API
Definition: dllexport.hpp:86
MatrixValue getMatrixValue(const std::string &Key) const
Definition: MapValue.hpp:309
@ MAP
Definition: Value.hpp:66
Definition: MapValue.hpp:92
std::string getString(const std::string &Key) const
Definition: MapValue.hpp:289
Type
Definition: Value.hpp:66
const VectorValue & asVectorValue() const
MapValue getMapValue(const std::string &Key) const
Definition: MapValue.hpp:319
Definition: IntegerValue.hpp:79
void setInteger(const std::string &Key, const long &Val)
Definition: MapValue.hpp:179
VectorValue getVectorValue(const std::string &Key) const
Definition: MapValue.hpp:299
bool isKeyExist(const std::string &Key) const
Definition: MapValue.hpp:353
void writeQuotedToStream(std::ostream &OutStm) const override
Definition: MapValue.hpp:151
Definition: DoubleValue.hpp:80
std::map< std::string, std::shared_ptr< Value > > Map_t
Definition: MapValue.hpp:96
unsigned long getSize() const
Definition: MapValue.hpp:334
Map_t::const_iterator const_iterator
Definition: MapValue.hpp:100
void setMatrixValue(const std::string &Key, const MatrixValue &Val)
Definition: MapValue.hpp:219
const MatrixValue & asMatrixValue() const
const_iterator end() const
Definition: MapValue.hpp:400
bool getBoolean(const std::string &Key) const
Definition: MapValue.hpp:279
void setString(const std::string &Key, const std::string &Val)
Definition: MapValue.hpp:199
Definition: ApplicationException.hpp:47
const_iterator begin() const
Definition: MapValue.hpp:382
long getInteger(const std::string &Key) const
Definition: MapValue.hpp:269
const MapValue & asMapValue() const
Map_t::iterator iterator
Definition: MapValue.hpp:98
unsigned long size() const
Definition: MapValue.hpp:343
Definition: BooleanValue.hpp:80
MapValue()
Definition: MapValue.hpp:113
Type getType() const override
Definition: MapValue.hpp:139
void setVectorValue(const std::string &Key, const VectorValue &Val)
Definition: MapValue.hpp:209
Value * clone() const override
Definition: MapValue.hpp:144
void setDouble(const std::string &Key, const double &Val)
Definition: MapValue.hpp:168
Definition: StringValue.hpp:76
MapValue(const Map_t &Val)
Definition: MapValue.hpp:126
iterator begin()
Definition: MapValue.hpp:373
Generated by
1.8.17