22#ifndef _CONFIGURATION_CONFIGMANAGER_H
23#define _CONFIGURATION_CONFIGMANAGER_H
25#include <boost/program_options.hpp>
32namespace Configuration {
106 template <
typename T>
129 template <
typename T1,
typename T2>
183 template <
typename T>
189 enum class State { REGISTRATION, WAITING_INITIALIZATION, INITIALIZED };
Manages a set of configuration classes.
std::unique_ptr< std::type_index > m_root_config
void registerConfiguration()
Registers a Configuration to the manager.
void registerDependency()
Registers a dependency between two configurations.
std::map< std::type_index, std::unique_ptr< Configuration > > m_config_dictionary
T & getConfiguration()
Returns a reference to the requested configuration.
virtual ~ConfigManager()=default
Destructor.
void initialize(const std::map< std::string, boost::program_options::variable_value > &user_values)
Initialize the manager.
std::map< std::type_index, std::set< std::type_index > > m_dependency_map
boost::program_options::options_description closeRegistration()
Terminates the manager registration phase.
static ConfigManager & getInstance(long id)
Returns a reference to the ConfigManager with the given ID.