Reads the configuration values from the input file.
More...
#include <ConfigReader.h>
|
| ConfigReader (const char *configFile) |
| Create the configuration reader from the given input file. More...
|
|
| ConfigReader (const ConfigReader &configReader) |
|
template<typename T > |
bool | lookupValue (const std::string &identifier, T &value) |
| Reads the configuration value identified by the identifier-string. More...
|
|
template<typename T > |
bool | lookupValue (const std::string &identifier, int index, T &value) |
| Reads the configuration value list identified by the identifier-string and returns the value stored at position index. More...
|
|
Reads the configuration values from the input file.
This class takes the file path to a configuration file as input and reads it using the libconfig++-Library
Definition at line 41 of file ConfigReader.h.
risa::ConfigReader::ConfigReader |
( |
const char * |
configFile | ) |
|
Create the configuration reader from the given input file.
- Parameters
-
[in] | configFile | path to configuration file |
Definition at line 32 of file ConfigReader.cpp.
risa::ConfigReader::ConfigReader |
( |
const ConfigReader & |
configReader | ) |
|
|
inline |
template<typename T >
bool risa::ConfigReader::lookupValue |
( |
const std::string & |
identifier, |
|
|
T & |
value |
|
) |
| |
|
inline |
Reads the configuration value identified by the identifier-string.
- Parameters
-
[in] | identifier | the string used to identify the desired parameter in the configuration file |
[out] | value | the value, that was passed in the configuration file |
- Return values
-
true | the parameter could be read successfully |
false | the parameter could not be read successfully |
Definition at line 63 of file ConfigReader.h.
template<typename T >
bool risa::ConfigReader::lookupValue |
( |
const std::string & |
identifier, |
|
|
int |
index, |
|
|
T & |
value |
|
) |
| |
|
inline |
Reads the configuration value list identified by the identifier-string and returns the value stored at position index.
- Parameters
-
[in] | identifier | the string used to identify the desired parameter in the configuration file |
[in] | index | the position at which the desired value shall be read |
[out] | value | the value, that was passed in the configuration file |
- Return values
-
true | the parameter could be read successfully |
false | the parameter could not be read successfully |
Definition at line 78 of file ConfigReader.h.
libconfig::Config risa::ConfigReader::cfg |
|
private |
The documentation for this class was generated from the following files: