23 #ifndef SRC_CONFIGURATION_PARAMETERSERVER_HPP_
24 #define SRC_CONFIGURATION_PARAMETERSERVER_HPP_
26 #include <boost/atomic.hpp>
27 #include <boost/thread/mutex.hpp>
28 #include <boost/program_options.hpp>
31 using namespace mic::logger;
37 namespace configuration {
43 typedef std::pair<std::string, mic::configuration::PropertyTree*>
id_pt_pair_t;
50 typedef std::map<std::string, mic::configuration::PropertyTree*>::iterator
id_pt_it_t;
70 void print(boost::property_tree::ptree
const& pt);
77 const boost::property_tree::ptree & returnNode(std::string node_name_);
90 boost::program_options::options_description &getProgramOptions();
95 const boost::program_options::variables_map &getProgramArguments();
102 void parseApplicationParameters(
int argc,
char* argv[]);
107 void loadPropertiesFromConfiguration();
112 void initializePropertyDependentVariables();
192 #define PARAM_SERVER mic::configuration::ParameterServer::getInstance()
Contains declaration of the PropertyTree class.
Parent class for all classes possessing properties. Contains methods useful for their management...
Contains definitions of main logger-related macros.
std::string application_name
Name of the executed binary file.
std::pair< std::string, mic::configuration::PropertyTree * > id_pt_pair_t
Type used in adding property trees to registry.
Server of application parameters - defined in the form of a singleton, with double-checked locking pa...
std::map< std::string, mic::configuration::PropertyTree * >::iterator id_pt_it_t
Type used during iterating/searching for property trees in registry.
char ** argv
Array of application parameters.
static boost::atomic< ParameterServer * > instance_
boost::program_options::options_description program_options
boost::program_options::variables_map program_arguments
boost::property_tree::ptree config_tree
static boost::mutex instantiation_mutex
std::map< std::string, mic::configuration::PropertyTree * > property_trees_registry
int argc
Number of application parameters.