configuration.h
47 bool mergeObjects(const rapidjson::Value &dstObject, rapidjson::Value &srcObject, rapidjson::Document::AllocatorType &allocator);
68 virtual bool getMember(const rapidjson::Value& conf, boost::system::error_code &ec, std::string member, int& value);
77 virtual bool getMember(const rapidjson::Value& conf, boost::system::error_code &ec, std::string member, std::string& value);
86 virtual bool getMember(const rapidjson::Value& conf, boost::system::error_code &ec, std::string member, bool& value);
119 virtual bool writeConfigurationToFile(boost::system::error_code &ec, const rapidjson::Document &doc, std::string path);
128 virtual bool writeConfigurationToFile(boost::system::error_code &ec, const std::string &doc, std::string path);
138 virtual bool getDocfromPath(boost::system::error_code &ec, rapidjson::Document &doc, std::string path);
virtual bool init(boost::system::error_code &ec, std::string path)
Inits configuration reading from file in path.
virtual bool readConfiguration(boost::system::error_code &ec, std::string path)=0
Reads the service configuration.
virtual bool getDocfromPath(boost::system::error_code &ec, rapidjson::Document &doc, std::string path)
Parse the data from the file existing in the path and introduce it into a rapidjson document object...
virtual bool writeConfigurationToFile(boost::system::error_code &ec, const rapidjson::Document &doc, std::string path)
Writes the configuration stored in doc to the path file.
virtual bool getMember(const rapidjson::Value &conf, boost::system::error_code &ec, std::string member, int &value)
Gets a INT member in rapidjson value.
virtual bool writeDefaultConfiguration(boost::system::error_code &ec, std::string path)=0
Writes default configuration to file.
Parent abstract class aimed to provide an interface for class children to manage the configuration fi...
Definition: configuration.h:43
virtual bool writeConfiguration(boost::system::error_code &ec, std::string path)=0
Writes the service configuration.