27 #include <boost/property_tree/json_parser.hpp>
28 #include <boost/foreach.hpp>
31 namespace configuration {
75 LOG(
LINFO) <<
"\t \"" << prop.first <<
"\" = " << prop.second->getValue();
89 LOG(
LTRACE) <<
"PropertyTree::loadPropertiesFromConfigNode";
96 using boost::property_tree::ptree;
97 for (ptree::const_iterator it = pt_.begin(); it != pt_.end(); ++it) {
101 value = it->second.get_value<std::string>();
103 LOG(
LDEBUG) <<
"Property: " << name <<
"=" << value;
108 LOG(
LWARNING) <<
"Object \"" <<
node_name <<
"\" has no property named \"" << name <<
"\", which is defined in configuration file.";
Contains declaration of the PropertyTree class.
Contains declaration of parameter server singleton along with some auxiliary typedefs.
std::string node_name
Name of the node in configuration file.
PropertyTree(std::string node_name_)
std::map< std::string, mic::configuration::PropertyInterface * > properties
Map of all registered properties.
void loadPropertiesFromConfigNode(boost::property_tree::ptree const &pt_)
PropertyInterface * getProperty(const std::string &name)
Basic interface property - used during registration etc.
std::string getNodeName() const
virtual std::string getValue()=0
std::pair< std::string, PropertyInterface * > PropertyPair
Type representing a pair consisting of name-property.
void printPropertiesWithValues()
#define PARAM_SERVER
Macro returning parameter server instance.
virtual void setValue(const std::string &str)=0
#define LOG(level)
Macro for message printing.
void registerProperty(PropertyInterface &prop)
const std::string & name() const