Global configuration class to bootstrap the root path of the configuration files.
More...
#include <config.hpp>
|
| void | dump (const std::string &path) |
| | Dump all involved config parameters.
|
| |
|
| Config (const std::string &config_filename) |
| | Configuration JSON filename.
|
| |
| template<typename T > |
| std::optional< T > | param (const std::string &module_name, const std::string ¶m_name) const |
| | Get a parameter.
|
| |
| template<typename T > |
| T | param (const std::string &module_name, const std::string ¶m_name, const T &default_value) const |
| | Get a parameter with default value.
|
| |
| template<typename T > |
| T | param_cast (const std::string &module_name, const std::string ¶m_name) const |
| | Get a parameter.
|
| |
| template<typename T > |
| std::optional< T > | param_nested (const std::vector< std::string > &nested_module_names, const std::string ¶m_name) const |
| | Get a parameter from a nested module.
|
| |
| template<typename T > |
| T | param_nested (const std::vector< std::string > &nested_module_names, const std::string ¶m_name, const T &default_value) const |
| | Get a parameter from a nested module with default value.
|
| |
| template<typename T > |
| T | param_cast_nested (const std::vector< std::string > &nested_module_names, const std::string ¶m_name) const |
| | Get a parameter.
|
| |
| template<typename T > |
| bool | override_param (const std::string &module_name, const std::string ¶m_name, const T &value) |
| | Override a parameter value.
|
| |
| void | save (const std::string &path) const |
| | Save config parameters as a JSON file.
|
| |
|
|
static GlobalConfig * | instance (const std::string &config_path=std::string(), bool override_path=false) |
| |
|
static std::string | get_config_path (const std::string &config_name) |
| |
Global configuration class to bootstrap the root path of the configuration files.
◆ dump()
| void glim::GlobalConfig::dump |
( |
const std::string & |
path | ) |
|
Dump all involved config parameters.
- Parameters
-
The documentation for this class was generated from the following file:
- /home/runner/work/glim/glim/include/glim/util/config.hpp