RSC  0.7.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsc::config::EnvironmentVariableSource Class Reference

Objects of this class analyze the environment of the current process, finding environment variables whose name starts with a specified string. More...

#include <Environment.h>

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

Public Member Functions

 EnvironmentVariableSource (const std::string &prefix="")
 Construct a source that collect environment variables whose name starts with prefix. More...
 
void provideOptions (OptionHandler &handler)
 Implementations should pass all configuration options to handler. More...
 
- Public Member Functions inherited from rsc::config::ConfigSource
virtual ~ConfigSource ()
 

Private Attributes

rsc::logging::LoggerPtr logger
 
const std::string prefix
 

Detailed Description

Objects of this class analyze the environment of the current process, finding environment variables whose name starts with a specified string.

The prefix is stripped from matching names and the variables are converted to options and passed to the OptionHandler.

Author
jmoringe

Definition at line 86 of file Environment.h.

Constructor & Destructor Documentation

rsc::config::EnvironmentVariableSource::EnvironmentVariableSource ( const std::string &  prefix = "")

Construct a source that collect environment variables whose name starts with prefix.

Parameters
prefixA prefix string against which all environment variables are matched.

Definition at line 100 of file Environment.cpp.

Member Function Documentation

void rsc::config::EnvironmentVariableSource::provideOptions ( OptionHandler handler)
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

Implements rsc::config::ConfigSource.

Definition at line 105 of file Environment.cpp.

References rsc::config::OptionHandler::handleOption(), logger, RSCTRACE, and rsc::config::transformName().

Here is the call graph for this function:

Member Data Documentation

rsc::logging::LoggerPtr rsc::config::EnvironmentVariableSource::logger
private

Definition at line 99 of file Environment.h.

Referenced by provideOptions().

const std::string rsc::config::EnvironmentVariableSource::prefix
private

Definition at line 101 of file Environment.h.


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