1#ifndef ARION_CONFIG_HPP
2#define ARION_CONFIG_HPP
17 std::map<std::string, std::any> config_map = {
18 {
"log_lvl", LOG_LEVEL::INFO}, {
"enable_sleep_syscalls",
false}, {
"thread_blocking_io",
false}};
29 auto it = this->config_map.find(key);
30 if (it == this->config_map.end())
43 auto it = this->config_map.find(key);
44 if (it == this->config_map.end())
48 return std::any_cast<T>(it->second);
50 catch (
const std::bad_any_cast &)
This class is responsible for storing a configuration which conditions the emulation of an Arion inst...
Definition config.hpp:13
void set_field(const std::string &key, T value)
Definition config.hpp:27
Config clone() const
Definition config.hpp:60
std::map< std::string, std::any > config_map
Definition config.hpp:17
T get_field(const std::string &key) const
Definition config.hpp:41
Thrown when a key is not found in the configuration.
Definition global_excepts.hpp:151
Thrown when trying to access a configuration key with the wrong type.
Definition global_excepts.hpp:163
#define ARION_EXPORT
Defines which symbols should be exported from the library.
Definition global_defs.hpp:13
Definition arch_x86-64.hpp:11