25#ifndef _CONFIGURATION_CONFIGURATION_H
26#define _CONFIGURATION_CONFIGURATION_H
28#include <boost/program_options/options_description.hpp>
29#include <boost/program_options/variables_map.hpp>
36namespace Configuration {
152 template <
typename T>
166 template <
typename T>
169 template <
typename T>
Superclass of all configuration classes.
void declareDependency()
Declares a Configuration as dependency.
virtual void initialize(const UserValues &args)
Method which is called during the initialization phase.
std::set< std::type_index > m_dependencies
virtual void preInitialize(const UserValues &args)
Method which is called before the initialization phase.
State & getCurrentState()
Returns the current state of the configuration.
const T & getDependency() const
State
Defines the different states the configuration object can be in.
@ FINAL
The postInitialize() method has been called.
@ PRE_INITIALIZED
The preInitialize() method has been called and waits for initialization.
@ INITIALIZED
The initialize() method has been called.
@ CONSTRUCTED
The object has just been constructed.
T & getDependency()
Returns a dependency.
virtual std::map< std::string, OptionDescriptionList > getProgramOptions()
Returns the program options defined by a specific configuration.
const std::set< std::type_index > & getDependencies()
Returns the dependencies of the configuration.
virtual void postInitialize(const UserValues &args)
Method which is called after the initialization phase.
virtual ~Configuration()=default
Destructor.