![]() |
0.3.0
|
Functions | |
void | CheckOptions (const int argc, const char *argv[]) |
Writes all command line options into the log. | |
void | deinitialize () |
Deinitializes the config manager. Call this if you want to Fetch config again. | |
std::vector< std::string > | FetchConfigs (const int argc, const char *argv[]) |
Fetches the configs from the command line parameters. | |
template<typename T> | |
const T & | Get (const std::string &key) |
Retrieves the value of a corresponding key from the configuration, if it does not exists, throws an exception. | |
template<typename T> | |
const T & | Get (const std::string &key, const T &&defaultValue) |
Retrieves the value of a corresponding key from the configuration, if one exists. | |
std::vector< std::string > | GetKeys () |
Returns all keys in the configuration, as a vector. | |
const boost::program_options::options_description & | GetProgramOptions () |
Get the Program Options object. | |
bool | HasKey (const std::string &key) |
Checks if a corresponding key exists in the configuration. | |
void | initialize () |
Initializes the config manager. Call this function before using other functions. | |
void | LoadGlobalSettings () |
Loads the global settings. | |
void | SaveGlobalSettings () |
Saves the global settings. | |
Variables | |
boost::program_options::variables_map | vm |
Map which stores all options. | |
void NAV::ConfigManager::CheckOptions | ( | const int | argc, |
const char * | argv[] ) |
Writes all command line options into the log.
[in] | argc | Number of command line parameters |
[in] | argv | Array of the command line parameters |
Definition at line 113 of file ConfigManager.cpp.
void NAV::ConfigManager::deinitialize | ( | ) |
Deinitializes the config manager. Call this if you want to Fetch config again.
Definition at line 68 of file ConfigManager.cpp.
std::vector< std::string > NAV::ConfigManager::FetchConfigs | ( | const int | argc, |
const char * | argv[] ) |
Fetches the configs from the command line parameters.
[in] | argc | Number of command line parameters |
[in] | argv | Array of the command line parameters |
Definition at line 78 of file ConfigManager.cpp.
const T & NAV::ConfigManager::Get | ( | const std::string & | key | ) |
Retrieves the value of a corresponding key from the configuration, if it does not exists, throws an exception.
T | Return value type |
[in] | key | Key to search for |
Definition at line 73 of file ConfigManager.hpp.
const T & NAV::ConfigManager::Get | ( | const std::string & | key, |
const T && | defaultValue ) |
Retrieves the value of a corresponding key from the configuration, if one exists.
T | Return value type |
[in] | key | Key to search for |
[in] | defaultValue | If key is not found, the default value is returned |
Definition at line 58 of file ConfigManager.hpp.
std::vector< std::string > NAV::ConfigManager::GetKeys | ( | ) |
Returns all keys in the configuration, as a vector.
Definition at line 168 of file ConfigManager.cpp.
|
nodiscard |
bool NAV::ConfigManager::HasKey | ( | const std::string & | key | ) |
Checks if a corresponding key exists in the configuration.
Definition at line 163 of file ConfigManager.cpp.
void NAV::ConfigManager::initialize | ( | ) |
Initializes the config manager. Call this function before using other functions.
Definition at line 36 of file ConfigManager.cpp.
void NAV::ConfigManager::LoadGlobalSettings | ( | ) |
Loads the global settings.
Definition at line 209 of file ConfigManager.cpp.
void NAV::ConfigManager::SaveGlobalSettings | ( | ) |
Saves the global settings.
Definition at line 180 of file ConfigManager.cpp.
|
extern |
Map which stores all options.
Definition at line 34 of file ConfigManager.cpp.