LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Rhesus::Toolkit::Configuration::Config Class Reference

Provides an object to store the configurations. More...

#include <Config.h>

Public Member Functions

void SetDefaultSection (std::string sectionId)
 
template<typename T >
Get (std::string section, std::string key)
 
template<typename T >
Get (std::string key)
 
void Set (std::string section, std::string key, std::string value)
 
void Set (std::string key, std::string value)
 
void AddSection (std::string section)
 

Static Public Member Functions

static Config Load (std::string filepath)
 

Detailed Description

Provides an object to store the configurations.

Author
Varun Parthasarathy

Member Function Documentation

void Config::AddSection ( std::string  section)

Adds a configuration section

Parameters
sectionthe name of the section to be added

Here is the caller graph for this function:

template<typename T >
T Rhesus::Toolkit::Configuration::Config::Get ( std::string  section,
std::string  key 
)
Returns
The value at the specified key within the specified section
Parameters
sectionthe section in which to search for the given key
thekey associated with the requested value
template<typename T >
T Rhesus::Toolkit::Configuration::Config::Get ( std::string  key)
Returns
The value at the specified key within the default section
Parameters
thekey associated with the requested value
Config Config::Load ( std::string  filepath)
static

static ConfigLoader function: used to load data from a file into the config object

Parameters
filepaththe path to the config file to be loaded
Returns
a new Config object populated with data from the specified file

Here is the call graph for this function:

void Rhesus::Toolkit::Configuration::Config::Set ( std::string  section,
std::string  key,
std::string  value 
)

sets the specified value at the specified location

Parameters
sectionthe section in which the desired key is located
keythe key for the value to change the desired value to be set

Here is the caller graph for this function:

void Rhesus::Toolkit::Configuration::Config::Set ( std::string  key,
std::string  value 
)

sets the value to a specific key within the default section

Parameters
keythe kay at which the desired value is located
valuethe value that is to be set
void Config::SetDefaultSection ( std::string  sectionId)

Sets the section that is accessed if none is specified

Parameters
sectionIdthe name of the default section

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