Namespaces | |
| namespace | Utils |
Typedefs | |
| using | KeyValueMap = std::unordered_map<std::string, std::string> |
| template<typename C> | |
| using | Setter = std::function<void(C&, const std::string&)> |
| template<typename C> | |
| using | Registry = std::unordered_map<std::string, Setter<C>> |
Functions | |
| KeyValueMap | parseConfigFile (const std::string &fileName, const std::string &rootNode) |
| void | throwCannotApplyConfigurationValue (const std::string &key, const std::string &value) |
| template<typename C, typename Arg> | |
| Setter< C > | makeSetter (C &(C::*mf)(Arg)) |
| template<typename C> | |
| void | loadFromFile (const std::string &fileName, C &obj, const Registry< C > ®, const std::string &rootNode, bool ignoreUnknown=true) |
| using KeyValueMap = std::unordered_map<std::string, std::string> |
Definition at line 101 of file ConfigurationParser.h.
Definition at line 111 of file ConfigurationParser.h.
Definition at line 110 of file ConfigurationParser.h.
| void loadFromFile | ( | const std::string & | fileName, |
| C & | obj, | ||
| const Registry< C > & | reg, | ||
| const std::string & | rootNode, | ||
| bool | ignoreUnknown = true ) |
Loads configuration from the given file.
Definition at line 125 of file ConfigurationParser.h.
Definition at line 114 of file ConfigurationParser.h.
| KeyValueMap parseConfigFile | ( | const std::string & | fileName, |
| const std::string & | rootNode ) |
Parses the given file to the key-value pair map.
| void throwCannotApplyConfigurationValue | ( | const std::string & | key, |
| const std::string & | value ) |