GLIM
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
glim::GlobalConfig Class Reference

Global configuration class to bootstrap the root path of the configuration files. More...

#include <config.hpp>

Inheritance diagram for glim::GlobalConfig:
Inheritance graph
[legend]
Collaboration diagram for glim::GlobalConfig:
Collaboration graph
[legend]

Public Member Functions

void dump (const std::string &path)
 Dump all involved config parameters.
 
- Public Member Functions inherited from glim::Config
 Config (const std::string &config_filename)
 Configuration JSON filename.
 
template<typename T >
std::optional< T > param (const std::string &module_name, const std::string &param_name) const
 Get a parameter.
 
template<typename T >
param (const std::string &module_name, const std::string &param_name, const T &default_value) const
 Get a parameter with default value.
 
template<typename T >
param_cast (const std::string &module_name, const std::string &param_name) const
 Get a parameter.
 
template<typename T >
std::optional< T > param_nested (const std::vector< std::string > &nested_module_names, const std::string &param_name) const
 Get a parameter from a nested module.
 
template<typename T >
param_nested (const std::vector< std::string > &nested_module_names, const std::string &param_name, const T &default_value) const
 Get a parameter from a nested module with default value.
 
template<typename T >
param_cast_nested (const std::vector< std::string > &nested_module_names, const std::string &param_name) const
 Get a parameter.
 
template<typename T >
bool override_param (const std::string &module_name, const std::string &param_name, const T &value)
 Override a parameter value.
 
void save (const std::string &path) const
 Save config parameters as a JSON file.
 

Static Public Member Functions

static GlobalConfiginstance (const std::string &config_path=std::string(), bool override_path=false)
 
static std::string get_config_path (const std::string &config_name)
 

Additional Inherited Members

- Protected Attributes inherited from glim::Config
std::any config
 

Detailed Description

Global configuration class to bootstrap the root path of the configuration files.

Member Function Documentation

◆ dump()

void glim::GlobalConfig::dump ( const std::string &  path)

Dump all involved config parameters.

Parameters
pathDestination path

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