40 bool read(
const std::string &fileName);
43 void getKeys(std::vector<std::string> &keys)
const;
47 bool getKeyValue(
const std::string &key, std::string &value)
const;
55 static std::string trim(
const std::string &s);
57 std::map<std::string, std::string> m_keyValues;
60 #endif // CONFIGREADER_H
bool getKeyValue(const std::string &key, std::string &value) const
For the key specified by the key parameter, the corresponding value will be stored in value...
Definition: configreader.cpp:71
Base class which allows an error message to be set.
Definition: errorbase.h:49
bool read(const std::string &fileName)
Reads the config file specified by fileName.
Definition: configreader.cpp:18
void printAll() const
Prints all key/value pairs to the standard output.
Definition: configreader.cpp:87
A helper class to read config files.
Definition: configreader.h:33
void getKeys(std::vector< std::string > &keys) const
Stores all keys found in the config file in keys.
Definition: configreader.cpp:146
void clear()
Clears the stored key/value pairs.
Definition: configreader.cpp:98