RSC  0.16.0
rsc::config::ConfigSource Class Referenceabstract

Implementations of this interface obtain configuration information somewhere and pass individual configuration options to an OptionHandler instance. More...

#include <ConfigSource.h>

Inheritance diagram for rsc::config::ConfigSource:
Inheritance graph
Collaboration diagram for rsc::config::ConfigSource:
Collaboration graph

Public Member Functions

virtual ~ConfigSource ()
 
virtual void provideOptions (OptionHandler &handler)=0
 Implementations should pass all configuration options to handler. More...
 

Protected Member Functions

void splitKeyAtDots (const std::string &input, std::vector< std::string > &output)
 Creates a key vector structure used in the options backend from a dot-separated string. More...
 

Detailed Description

Implementations of this interface obtain configuration information somewhere and pass individual configuration options to an OptionHandler instance.

Author
jmoringe

Definition at line 42 of file ConfigSource.h.

Constructor & Destructor Documentation

rsc::config::ConfigSource::~ConfigSource ( )
virtual

Definition at line 38 of file ConfigSource.cpp.

Member Function Documentation

virtual void rsc::config::ConfigSource::provideOptions ( OptionHandler handler)
pure virtual

Implementations should pass all configuration options to handler.

Parameters
handlerThe handler to which all option should be passed.
Exceptions
std::invalid_argumentmay be thrown when the options this source uses in the background are not well-formated

Implemented in rsc::config::EnvironmentVariableSource, rsc::config::CommandLinePropertySource, and rsc::config::ConfigFileSource.

void rsc::config::ConfigSource::splitKeyAtDots ( const std::string &  input,
std::vector< std::string > &  output 
)
protected

Creates a key vector structure used in the options backend from a dot-separated string.

Parameters
inputsdot-separated key
outputkey as vector of components
Exceptions
invalid_argumentinvalid key that cannot be split.

Definition at line 41 of file ConfigSource.cpp.

Referenced by rsc::config::ConfigFileSource::ConfigFileSource(), and rsc::config::CommandLinePropertySource::provideOptions().

Here is the caller graph for this function:


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