MachineIntelligenceCore:Toolchain
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PropertyTree.hpp
Go to the documentation of this file.
1 
23 #ifndef SRC_CONFIGURATION_PROPERTYTREE_HPP_
24 #define SRC_CONFIGURATION_PROPERTYTREE_HPP_
25 
27 
28 #include <boost/property_tree/ptree.hpp>
29 
30 namespace mic {
31 namespace configuration {
32 
37 class PropertyTree {
38 public:
43  PropertyTree(std::string node_name_);
44 
48  virtual ~PropertyTree();
49 
55 
60  std::string getNodeName() const;
61 
65  void loadPropertiesFromConfigNode(boost::property_tree::ptree const& pt_);
66 
70  void printProperties();
71 
76 
82  PropertyInterface * getProperty(const std::string& name);
83 
87  virtual void initializePropertyDependentVariables() = 0;
88 
89 private:
91  std::map<std::string, mic::configuration::PropertyInterface*> properties;
92 
94  std::string node_name;
95 };
96 
97 } /* namespace configuration */
98 } /* namespace mic */
99 
100 #endif /* SRC_CONFIGURATION_PROPERTYTREE_HPP_ */
Parent class for all classes possessing properties. Contains methods useful for their management...
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.
Definition: Property.hpp:90
std::string getNodeName() const
void registerProperty(PropertyInterface &prop)
virtual void initializePropertyDependentVariables()=0
Contains declaration of the Property class.