RSC
0.17.1
|
Instances of this class can be used to configure the #Manager based on configuration options. More...
#include <Configurator.h>
Public Member Functions | |
Configurator (ManagerPtr manager, const std::vector< boost::filesystem::path > &defaultPath) | |
Constructs a Configurator with default plugin search path defaultPath. More... | |
virtual | ~Configurator () |
void | handleOption (const std::vector< std::string > &key, const std::string &value) |
This method is called once for each individual option available from a given ConfigSource. More... | |
void | execute (bool errorOnMissing=true) |
Performs the actual loading of plugins. More... | |
Public Member Functions inherited from rsc::config::OptionHandler | |
virtual | ~OptionHandler () |
Private Member Functions | |
void | addDefaultPath () |
void | addPathEntries (const std::vector< std::string > &entries) |
void | loadPlugins (const std::vector< std::string > &names, bool errorOnMissing) |
Private Attributes | |
logging::LoggerPtr | logger |
ManagerPtr | manager |
std::vector< boost::filesystem::path > | defaultPath |
std::vector< std::string > | path |
std::vector< std::string > | load |
Instances of this class can be used to configure the #Manager based on configuration options.
Definition at line 48 of file Configurator.h.
rsc::plugins::Configurator::Configurator | ( | ManagerPtr | manager, |
const std::vector< boost::filesystem::path > & | defaultPath | ||
) |
Constructs a Configurator
with default plugin search path defaultPath.
manager | the manager to configure |
defaultPath | A #vector of #boost::filesystem::path objects which should be installed as plugin search path in case no plugin search path is configured. |
Definition at line 48 of file Configurator.cpp.
References path.
|
virtual |
Definition at line 58 of file Configurator.cpp.
|
private |
Definition at line 92 of file Configurator.cpp.
References defaultPath, and manager.
Referenced by addPathEntries().
|
private |
Definition at line 99 of file Configurator.cpp.
References addDefaultPath(), defaultPath, logger, manager, path, and RSCINFO.
Referenced by execute().
void rsc::plugins::Configurator::execute | ( | bool | errorOnMissing = true | ) |
Performs the actual loading of plugins.
Potential errors are reported via exceptions here.
errorOnMissing | If true , report and error in case a requested plugin could not be loaded. |
rsc::runtime::NoSuchObject | a requested plugin could not be found |
std::runtime_error | A plugin failed to load |
Definition at line 61 of file Configurator.cpp.
References addPathEntries(), load, loadPlugins(), and path.
|
virtual |
This method is called once for each individual option available from a given ConfigSource.
key | A list of hierarchical key components that identify the option. |
value | The value of the option. |
Implements rsc::config::OptionHandler.
Definition at line 66 of file Configurator.cpp.
References std::container_none, std::element_sequence(), load, logger, rsc::config::mergeSequenceValue(), path, and RSCDEBUG.
|
private |
|
private |
Definition at line 84 of file Configurator.h.
Referenced by addDefaultPath(), and addPathEntries().
|
private |
Definition at line 87 of file Configurator.h.
Referenced by execute(), and handleOption().
|
private |
Definition at line 80 of file Configurator.h.
Referenced by addPathEntries(), handleOption(), and loadPlugins().
|
private |
Definition at line 82 of file Configurator.h.
Referenced by addDefaultPath(), addPathEntries(), and loadPlugins().
|
private |
Definition at line 86 of file Configurator.h.
Referenced by addPathEntries(), Configurator(), execute(), and handleOption().