7 #ifndef O2_CONFIGURATION_CONFIGURATIONINTERFACE_H_
8 #define O2_CONFIGURATION_CONFIGURATIONINTERFACE_H_
11 #include <unordered_map>
12 #include <boost/optional.hpp>
13 #include <boost/property_tree/ptree.hpp>
17 namespace configuration
20 using KeyValueMap = std::unordered_map<std::string, std::string>;
36 virtual void putString(
const std::string& path,
const std::string& value) = 0;
41 virtual boost::optional<std::string>
getString(
const std::string& path) = 0;
48 void put(
const std::string& path,
const T& value);
53 virtual void putRecursive(
const std::string& path,
const boost::property_tree::ptree& tree);
60 T
get(
const std::string& path);
66 T
get(
const std::string& path,
const T& defaultValue);
72 virtual void setPrefix(
const std::string& prefix) = 0;
82 virtual boost::property_tree::ptree
getRecursive(
const std::string& path = {}) = 0;
virtual boost::optional< std::string > getString(const std::string &path)=0
void put(const std::string &path, const T &value)
Interface for configuration back ends.
Definition: ConfigurationInterface.h:28
virtual boost::property_tree::ptree getRecursive(const std::string &path={})=0
virtual void setPrefix(const std::string &prefix)=0
virtual void putString(const std::string &path, const std::string &value)=0
virtual void putRecursive(const std::string &path, const boost::property_tree::ptree &tree)
Definition: ConfigurationInterface.cxx:36
virtual KeyValueMap getRecursiveMap(const std::string &path={})=0