RSC  0.12.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rsc::plugins::Configurator Class Reference

Instances of this class can be used to configure the #Manager based on configuration options. More...

#include <Configurator.h>

Inheritance diagram for rsc::plugins::Configurator:
Inheritance graph
Collaboration diagram for rsc::plugins::Configurator:
Collaboration graph

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...
 
- Public Member Functions inherited from rsc::config::OptionHandler
virtual ~OptionHandler ()
 

Private Member Functions

void addDefaultPath ()
 
std::vector< std::string > splitValue (const std::string &value) const
 

Private Attributes

logging::LoggerPtr logger
 
ManagerPtr manager
 
bool pathSet
 
std::vector
< boost::filesystem::path > 
defaultPath
 
std::set< std::string > load
 

Detailed Description

Instances of this class can be used to configure the #Manager based on configuration options.

Note that the configuration may be performed when the object is destructed.

Author
jmoringe

Definition at line 51 of file Configurator.h.

Constructor & Destructor Documentation

rsc::plugins::Configurator::Configurator ( ManagerPtr  manager,
const std::vector< boost::filesystem::path > &  defaultPath 
)

Constructs a Configurator with default plugin search path defaultPath.

Parameters
managerthe manager to configure
defaultPathA #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 45 of file Configurator.cpp.

rsc::plugins::Configurator::~Configurator ( )
virtual

Definition at line 53 of file Configurator.cpp.

References addDefaultPath(), defaultPath, load, logger, manager, pathSet, RSCDEBUG, and RSCINFO.

Here is the call graph for this function:

Member Function Documentation

void rsc::plugins::Configurator::addDefaultPath ( )
private

Definition at line 168 of file Configurator.cpp.

References defaultPath, and manager.

Referenced by handleOption(), and ~Configurator().

Here is the caller graph for this function:

void rsc::plugins::Configurator::handleOption ( const std::vector< std::string > &  key,
const std::string &  value 
)
virtual

This method is called once for each individual option available from a given ConfigSource.

Parameters
keyA list of hierarchical key components that identify the option.
valueThe value of the option.

Implements rsc::config::OptionHandler.

Definition at line 96 of file Configurator.cpp.

References addDefaultPath(), load, logger, manager, pathSet, RSCDEBUG, and splitValue().

Here is the call graph for this function:

vector< string > rsc::plugins::Configurator::splitValue ( const std::string &  value) const
private

Definition at line 175 of file Configurator.cpp.

Referenced by handleOption().

Here is the caller graph for this function:

Member Data Documentation

std::vector<boost::filesystem::path> rsc::plugins::Configurator::defaultPath
private

Definition at line 76 of file Configurator.h.

Referenced by addDefaultPath(), and ~Configurator().

std::set<std::string> rsc::plugins::Configurator::load
private

Definition at line 77 of file Configurator.h.

Referenced by handleOption(), and ~Configurator().

logging::LoggerPtr rsc::plugins::Configurator::logger
private

Definition at line 71 of file Configurator.h.

Referenced by handleOption(), and ~Configurator().

ManagerPtr rsc::plugins::Configurator::manager
private

Definition at line 73 of file Configurator.h.

Referenced by addDefaultPath(), handleOption(), and ~Configurator().

bool rsc::plugins::Configurator::pathSet
private

Definition at line 75 of file Configurator.h.

Referenced by handleOption(), and ~Configurator().


The documentation for this class was generated from the following files: