carl  24.04
Computer ARithmetic Library
carl::settings::Settings Struct Reference

Base class for central settings class. More...

#include <Settings.h>

Collaboration diagram for carl::settings::Settings:

Public Member Functions

template<typename T >
T & get (const std::string &name)
 Get settings data of type T from the identifier name. Constructs the data object if it does not exist yet. More...
 

Private Attributes

std::map< std::string, std::any > mSettings
 Maps identifier to any object holding the actual settings data. More...
 

Detailed Description

Base class for central settings class.

Wraps a map from a string identifier to some struct holding the actual settings, wrapped as std::any. Simply call .get<SettingsData>("identifier") to obtain a reference to the settings data, which is created (and thereby initialized) lazily.

Definition at line 17 of file Settings.h.

Member Function Documentation

◆ get()

template<typename T >
T& carl::settings::Settings::get ( const std::string &  name)
inline

Get settings data of type T from the identifier name. Constructs the data object if it does not exist yet.

Definition at line 24 of file Settings.h.

Field Documentation

◆ mSettings

std::map<std::string,std::any> carl::settings::Settings::mSettings
private

Maps identifier to any object holding the actual settings data.

Definition at line 20 of file Settings.h.


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