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;
std::map< std::string, std::string > myMap
The key->value map.
void unsetParameter(const std::string &key)
Removes a parameter.
bool knowsParameter(const std::string &key) const
Returns whether the parameter is known.
void updateParameter(const std::map< std::string, std::string > &mapArg)
Adds or updates all given parameters from the map.
~Parameterised()
Destructor.
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
An upper class for objects with additional parameters.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
double getDouble(const std::string &key, const double defaultValue) const
Returns the value for a given key converted to a double.
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
Parameterised()
Constructor.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
Static storage of an output device and its base (abstract) implementation.
void clearParameter()
Clears the parameter map.