4 #ifndef DMLITE_CPP_UTILS_EXTENSIBLE_H
5 #define DMLITE_CPP_UTILS_EXTENSIBLE_H
7 #include <boost/any.hpp>
8 #include <boost/property_tree/ptree.hpp>
21 typedef std::map<std::string, boost::any>
DictType_;
24 void populate(
const boost::property_tree::ptree& root);
32 static long anyToLong (
const boost::any& any);
36 static std::string
anyToString (
const boost::any& any);
39 bool hasField(
const std::string& key)
const;
56 unsigned long size()
const;
65 void erase(
const std::string&);
77 bool getBool(const std::
string& key) const throw (DmException);
80 long getLong(const std::
string& key) const throw (DmException);
83 unsigned long getUnsigned(const std::
string& key) const throw (DmException);
86 double getDouble(const std::
string& key) const throw (DmException);
89 std::
string getString(const std::
string& key) const throw (DmException);
95 std::vector<boost::any>
getVector(const std::
string& key) const throw (DmException);
100 #endif // DMLITE_CPP_UTILS_TYPES_H