Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion::Config Class Reference

This class is responsible for storing a configuration which conditions the emulation of an Arion instance. More...

#include <config.hpp>

Public Member Functions

template<typename T >
void set_field (const std::string &key, T value)
 
template<typename T >
get_field (const std::string &key) const
 
Config clone () const
 

Private Attributes

std::map< std::string, std::any > config_map
 

Detailed Description

This class is responsible for storing a configuration which conditions the emulation of an Arion instance.

Member Function Documentation

◆ 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
TThe type of the field to read.
Parameters
keyTHe 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,
value 
)
inline

Defines the value of a field in the configuration. The value can be of any type for genericity purpose.

Template Parameters
TType of the value field.
Parameters
keyThe name of the field to be defined.
valueThe new value for the field.

Member Data Documentation

◆ 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: