23 #ifndef Parameterised_h 24 #define Parameterised_h 61 Parameterised(
const std::map<std::string, std::string>& mapArg);
73 void addParameter(
const std::string& key,
const std::string& value);
79 void addParameter(
const std::map<std::string, std::string>& mapArg);
100 const std::string&
getParameter(
const std::string& key,
const std::string& defaultValue)
const;
108 double getDouble(
const std::string& key,
const double defaultValue)
const;
119 const std::map<std::string, std::string>&
getMap()
const {
128 std::map<std::string, std::string>
myMap;
std::map< std::string, std::string > myMap
The key->value map.
void writeParams(OutputDevice &out) const
bool knowsParameter(const std::string &key) const
Returns whether the parameter is known.
~Parameterised()
Destructor.
An upper class for objects with additional parameters.
double getDouble(const std::string &key, const double defaultValue) const
Returns the value for a given key converted to a double.
void addParameter(const std::string &key, const std::string &value)
Adds a parameter.
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 > & getMap() const
Returns the inner key/value map.
Parameterised()
Constructor.
Static storage of an output device and its base (abstract) implementation.
void clearParameter()
Clears the parameter map.