Configuration object, mapping values to names and possibly containing lists of further configuration objects.
More...
#include <configuration.h>
|
virtual | ~ConfigurationObject () |
|
void | setValue (const std::string &key, const std::string &value) |
| Sets an option using a string value.
|
|
std::string | getValue (const std::string &key, const std::string &deflt) const |
| Gets a value as string.
|
|
int | getValue (const std::string &key, int deflt) const |
|
unsigned | getValue (const std::string &key, unsigned deflt) const |
|
double | getValue (const std::string &key, double deflt) const |
|
void | clear () |
| Re-sets all data in the configuration.
|
|
|
std::map< std::string, std::string > | mOptions |
|
Configuration object, mapping values to names and possibly containing lists of further configuration objects.
Definition at line 45 of file configuration.h.
◆ ~ConfigurationObject()
ConfigurationObject::~ConfigurationObject |
( |
| ) |
|
|
virtual |
◆ clear()
void ConfigurationObject::clear |
( |
| ) |
|
◆ getValue() [1/4]
std::string ConfigurationObject::getValue |
( |
const std::string & |
key, |
|
|
const std::string & |
deflt |
|
) |
| const |
Gets a value as string.
- Parameters
-
key | Option identifier. |
deflt | Default option if not there or error. |
Definition at line 36 of file configuration.cpp.
◆ getValue() [2/4]
double ConfigurationObject::getValue |
( |
const std::string & |
key, |
|
|
double |
deflt |
|
) |
| const |
◆ getValue() [3/4]
int ConfigurationObject::getValue |
( |
const std::string & |
key, |
|
|
int |
deflt |
|
) |
| const |
◆ getValue() [4/4]
unsigned ConfigurationObject::getValue |
( |
const std::string & |
key, |
|
|
unsigned |
deflt |
|
) |
| const |
◆ initFromXML()
void ConfigurationObject::initFromXML |
( |
XML::Node |
node | ) |
|
|
protected |
◆ setValue()
void ConfigurationObject::setValue |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
Sets an option using a string value.
- Parameters
-
key | Option identifier. |
value | Value. |
Definition at line 30 of file configuration.cpp.
◆ Configuration
◆ mOptions
std::map<std::string, std::string> ConfigurationObject::mOptions |
|
protected |
The documentation for this class was generated from the following files: