#include <config_reader.h>
|
| Config_reader (const std::string config_file_path) |
| Constructor. More...
|
|
template<typename T > |
bool | get_element (const std::string element_name, T &element_value) |
| Get an element value from JSON document. More...
|
|
◆ Config_reader()
keyring_common::config::Config_reader::Config_reader |
( |
const std::string |
config_file_path | ) |
|
|
explicit |
Constructor.
Reads JSON from config file and stores it in memory.
- Parameters
-
[in] | config_file_path | Full path to configuration file |
◆ get_element()
template<typename T >
bool keyring_common::config::Config_reader::get_element |
( |
const std::string |
element_name, |
|
|
T & |
element_value |
|
) |
| |
|
inline |
Get an element value from JSON document.
Assumption: Type is compatible with Get() function and type of element is matching with template argument.
- Parameters
-
[in] | element_name | Name of the element being searched |
[out] | element_value | Value of the element |
- Returns
- status of search operation
- Return values
-
false | Element found. Refer to element_value |
true | Element missing. |
◆ config_file_path_
std::string keyring_common::config::Config_reader::config_file_path_ |
|
private |
◆ data_
rapidjson::Document keyring_common::config::Config_reader::data_ |
|
private |
Configuration data in JSON.
◆ valid_
bool keyring_common::config::Config_reader::valid_ |
|
private |
Validity of configuration data.
The documentation for this class was generated from the following files: