24#ifndef CONFIG_READER_INCLUDED
25#define CONFIG_READER_INCLUDED
29#define RAPIDJSON_HAS_STDSTRING 1
33#include <rapidjson/document.h>
61 bool get_element(
const std::string &element_name, T &element_value) {
62 if (!
valid_ || !
data_.HasMember(element_name))
return true;
63 element_value =
data_[element_name].Get<T>();
Definition: config_reader.h:37
rapidjson::Document data_
Configuration data in JSON.
Definition: config_reader.h:71
Config_reader(std::string config_file_path)
Constructor.
Definition: config_reader.cc:33
bool valid_
Validity of configuration data.
Definition: config_reader.h:73
bool get_element(const std::string &element_name, T &element_value)
Get an element value from JSON document.
Definition: config_reader.h:61
std::string config_file_path_
Configuration file path.
Definition: config_reader.h:69
Define rapidjson::SizeType to be std::size_t.
Definition: config_reader.cc:31