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

Classes

class  ConfigFileSource
 Objects of this class parse streams that contain configuration information in "ini-file" syntax. More...
 
class  ConfigSource
 Implementations of this interface obtain configuration information somewhere and pass individual configuration options to an OptionHandler instance. More...
 
class  EnvironmentVariableSource
 Objects of this class analyze the environment of the current process, finding environment variables whose name starts with a specified string. More...
 
class  OptionHandler
 Implementations of this interface receive options from ConfigSource objects. More...
 
class  PropertyHandler
 This implementation of the OptionHandler interface stores all options it receives into a runtime::Properties object. More...
 

Functions

string trim (const string &s)
 
path systemConfigDirectory ()
 Return the directory in which system-wide configuration files are located. More...
 
path userHomeDirectory ()
 Return the home directory of the user associated with the current process. More...
 
path userConfigDirectory ()
 Return the canonical directory for configuration files of the user associated with the current process. More...
 
string transformName (const string &name, const string &prefix)
 
any parseTypedValue (const std::string &value)
 Parses value and returns a boost::any object containing an object of the type indicated in value. More...
 

Function Documentation

RSC_EXPORT boost::any rsc::config::parseTypedValue ( const std::string &  value)

Parses value and returns a boost::any object containing an object of the type indicated in value.

Supported types are bool, uint, int and double.

Parameters
valueA string of the form <TYPE>VALUE.
Returns
A boost::any object.
Exceptions
invalid_argumentIf the type specification is malformed or the specified type is unknown.
Author
jmoringe

Definition at line 41 of file TypedValue.cpp.

Referenced by rsc::config::PropertyHandler::handleOption().

Here is the caller graph for this function:

RSC_EXPORT boost::filesystem::path rsc::config::systemConfigDirectory ( )

Return the directory in which system-wide configuration files are located.

Returns
A boost::filesystem::path object representing the system configuration directory.
Author
jmoringe

Definition at line 56 of file Environment.cpp.

string rsc::config::transformName ( const string &  name,
const string &  prefix 
)

Definition at line 89 of file Environment.cpp.

Referenced by rsc::config::EnvironmentVariableSource::provideOptions().

Here is the caller graph for this function:

string rsc::config::trim ( const string &  s)

Definition at line 44 of file ConfigFileSource.cpp.

Referenced by rsc::config::ConfigFileSource::getOption().

Here is the caller graph for this function:

RSC_EXPORT boost::filesystem::path rsc::config::userConfigDirectory ( )

Return the canonical directory for configuration files of the user associated with the current process.

Returns
A boost::filesystem::path object representing the configuration directory of the user.
Exceptions
std::runtime_errorif no config directory for the user is available
Author
jmoringe

Definition at line 85 of file Environment.cpp.

References userHomeDirectory().

Here is the call graph for this function:

RSC_EXPORT boost::filesystem::path rsc::config::userHomeDirectory ( )

Return the home directory of the user associated with the current process.

Returns
A boost::filesystem::path object representing the home directory of the user.
Exceptions
std::runtime_errorif no home directory for the user is available
Author
jmoringe

Definition at line 64 of file Environment.cpp.

Referenced by userConfigDirectory().

Here is the caller graph for this function: