22#include <boost/filesystem.hpp>
23#include <boost/property_tree/ptree.hpp>
24#include <boost/property_tree/json_parser.hpp>
25#include <boost/property_tree/info_parser.hpp>
26#include <boost/exception/exception.hpp>
27#include <boost/current_function.hpp>
28#include <boost/throw_exception.hpp>
29#include <boost/foreach.hpp>
63 std::list<ConfigParser>
getObjList(
const std::string &key);
79 T
getVal(
const std::string &key);
88 std::list<T>
getList(
const std::string &key);
96 ConfigParser(
const boost::property_tree::ptree &subtree);
99 boost::property_tree::ptree
tree;
110 return tree.get<T>(key);
122 BOOST_FOREACH(
const boost::property_tree::ptree::value_type &val,
tree.get_child(key))
124 if (val.second.empty()) {
125 lst_.push_back(val.second.get_value<T>());
127 std::cerr <<
"List does not contain single values. Please use 'getObjList(const std::string &key)'instead."
128 <<
" - Returning empty list." << std::endl;
Config parser class for reading input parameter/settings.
T getVal(const std::string &key)
ConfigParser getObj(const std::string &key)
boost::property_tree::ptree tree
boost property tree instance
std::list< ConfigParser > getObjList(const std::string &key)
std::list< T > getList(const std::string &key)