 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
20 #ifndef Parameterised_h
21 #define Parameterised_h
51 Parameterised(
const std::map<std::string, std::string>& mapArg);
60 void setParameter(
const std::string& key,
const std::string& value);
83 const std::string
getParameter(
const std::string& key,
const std::string& defaultValue =
"")
const;
90 double getDouble(
const std::string& key,
const double defaultValue)
const;
103 std::map<std::string, std::string>
myMap;
void updateParameter(const std::map< std::string, std::string > &mapArg)
Adds or updates all given parameters from the map.
An upper class for objects with additional parameters.
Static storage of an output device and its base (abstract) implementation.
Parameterised()
Constructor.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
~Parameterised()
Destructor.
void unsetParameter(const std::string &key)
Removes a parameter.
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
void clearParameter()
Clears the parameter map.
std::map< std::string, std::string > myMap
The key->value map.
double getDouble(const std::string &key, const double defaultValue) const
Returns the value for a given key converted to a double.
bool knowsParameter(const std::string &key) const
Returns whether the parameter is known.