This class is responsible for storing a configuration which conditions the emulation of an Arion instance.
More...
#include <config.hpp>
|
| template<typename T > |
| void | set_field (const std::string &key, T value) |
| |
| template<typename T > |
| T | get_field (const std::string &key) const |
| |
| Config | clone () const |
| |
This class is responsible for storing a configuration which conditions the emulation of an Arion instance.
◆ clone()
| Config arion::Config::clone |
( |
| ) |
const |
|
inline |
Clones the configuration into a new one.
- Returns
- The new configuration.
◆ get_field()
template<typename T >
| T arion::Config::get_field |
( |
const std::string & |
key | ) |
const |
|
inline |
Retrieves the value of a field from the configuration. The value can be of any type for genericity purpose.
- Template Parameters
-
| T | The type of the field to read. |
- Parameters
-
| key | THe name of the field to retrieve. |
- Returns
- The value of the field.
◆ set_field()
template<typename T >
| void arion::Config::set_field |
( |
const std::string & |
key, |
|
|
T |
value |
|
) |
| |
|
inline |
Defines the value of a field in the configuration. The value can be of any type for genericity purpose.
- Template Parameters
-
| T | Type of the value field. |
- Parameters
-
| key | The name of the field to be defined. |
| value | The new value for the field. |
◆ config_map
| std::map<std::string, std::any> arion::Config::config_map |
|
private |
Initial value:= {
{
"log_lvl",
LOG_LEVEL::INFO}, {
"enable_sleep_syscalls",
false}, {
"thread_blocking_io",
false}}
@ INFO
General informational messages about application progress.
Definition global_defs.hpp:162
A map identifying a configuration value given its name. The value can be of any type for genericity purpose and must be casted.
The documentation for this class was generated from the following file:
- /home/runner/work/Arion/Arion/include/arion/common/config.hpp