Provides an object to store the configurations.
More...
#include <Config.h>
|
void | SetDefaultSection (std::string sectionId) |
|
template<typename T > |
T | Get (std::string section, std::string key) |
|
template<typename T > |
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) |
|
Provides an object to store the configurations.
- Author
- Varun Parthasarathy
void Config::AddSection |
( |
std::string |
section | ) |
|
Adds a configuration section
- Parameters
-
section | the name of the section to be added |
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
-
section | the section in which to search for the given key |
the | key 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
-
the | key 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
-
filepath | the path to the config file to be loaded |
- Returns
- a new Config object populated with data from the specified file
void Rhesus::Toolkit::Configuration::Config::Set |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
std::string |
value |
|
) |
| |
sets the specified value at the specified location
- Parameters
-
section | the section in which the desired key is located |
key | the key for the value to change the desired value to be set |
void Rhesus::Toolkit::Configuration::Config::Set |
( |
std::string |
key, |
|
|
std::string |
value |
|
) |
| |
sets the value to a specific key within the default section
- Parameters
-
key | the kay at which the desired value is located |
value | the value that is to be set |
void Config::SetDefaultSection |
( |
std::string |
sectionId | ) |
|
Sets the section that is accessed if none is specified
- Parameters
-
sectionId | the name of the default section |
The documentation for this class was generated from the following files:
- Rhesus/Toolkit/Configuration/Config.h
- Rhesus/Toolkit/Configuration/Config.cpp