opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
osc::AppSettings Class Referencefinal

#include <app_settings.h>

Public Member Functions

 AppSettings (std::string_view organization_name, std::string_view application_name, std::string_view application_config_file_name)
 
 AppSettings (const AppSettings &)
 
 AppSettings (AppSettings &&) noexcept
 
AppSettingsoperator= (const AppSettings &)
 
AppSettingsoperator= (AppSettings &&) noexcept
 
 ~AppSettings () noexcept
 
std::optional< std::filesystem::path > system_configuration_file_location () const
 
std::optional< Variantfind_value (std::string_view key) const
 
template<typename T >
requires std::constructible_from<T, Variant>
std::optional< Tfind_value (std::string_view key) const
 
Variant get_value (std::string_view key, Variant fallback=Variant{}) const
 
template<typename T >
requires std::constructible_from<Variant, T&&>
and std::constructible_from< T, Variant > T get_value (std::string_view key, T &&fallback=T{}) const
 
void set_value (std::string_view key, Variant, AppSettingScope=AppSettingScope::User)
 
template<typename T >
requires std::constructible_from<Variant, T&&>
void set_value (std::string_view key, T &&value, AppSettingScope scope=AppSettingScope::User)
 
void set_value_if_not_found (std::string_view key, Variant, AppSettingScope=AppSettingScope::User)
 
template<typename T >
requires std::constructible_from<Variant, T&&>
void set_value_if_not_found (std::string_view key, T &&value, AppSettingScope scope=AppSettingScope::User)
 
std::optional< std::filesystem::path > find_value_filesystem_source (std::string_view key) const
 
void sync ()
 

Constructor & Destructor Documentation

◆ AppSettings() [1/3]

osc::AppSettings::AppSettings ( std::string_view  organization_name,
std::string_view  application_name,
std::string_view  application_config_file_name 
)

◆ AppSettings() [2/3]

osc::AppSettings::AppSettings ( const AppSettings )

◆ AppSettings() [3/3]

osc::AppSettings::AppSettings ( AppSettings &&  )
noexcept

◆ ~AppSettings()

osc::AppSettings::~AppSettings ( )
noexcept

Member Function Documentation

◆ find_value() [1/2]

std::optional< Variant > osc::AppSettings::find_value ( std::string_view  key) const

◆ find_value() [2/2]

template<typename T >
requires std::constructible_from<T, Variant>
std::optional< T > osc::AppSettings::find_value ( std::string_view  key) const
inline

◆ find_value_filesystem_source()

std::optional< std::filesystem::path > osc::AppSettings::find_value_filesystem_source ( std::string_view  key) const

◆ get_value() [1/2]

template<typename T >
requires std::constructible_from<Variant, T&&>
and std::constructible_from< T, Variant > T osc::AppSettings::get_value ( std::string_view  key,
T &&  fallback = T{} 
) const
inline

◆ get_value() [2/2]

Variant osc::AppSettings::get_value ( std::string_view  key,
Variant  fallback = Variant{} 
) const
inline

◆ operator=() [1/2]

AppSettings & osc::AppSettings::operator= ( AppSettings &&  )
noexcept

◆ operator=() [2/2]

AppSettings & osc::AppSettings::operator= ( const AppSettings )

◆ set_value() [1/2]

template<typename T >
requires std::constructible_from<Variant, T&&>
void osc::AppSettings::set_value ( std::string_view  key,
T &&  value,
AppSettingScope  scope = AppSettingScope::User 
)
inline

◆ set_value() [2/2]

void osc::AppSettings::set_value ( std::string_view  key,
Variant  ,
AppSettingScope  = AppSettingScope::User 
)

◆ set_value_if_not_found() [1/2]

template<typename T >
requires std::constructible_from<Variant, T&&>
void osc::AppSettings::set_value_if_not_found ( std::string_view  key,
T &&  value,
AppSettingScope  scope = AppSettingScope::User 
)
inline

◆ set_value_if_not_found() [2/2]

void osc::AppSettings::set_value_if_not_found ( std::string_view  key,
Variant  ,
AppSettingScope  = AppSettingScope::User 
)

◆ sync()

void osc::AppSettings::sync ( )

◆ system_configuration_file_location()

std::optional< std::filesystem::path > osc::AppSettings::system_configuration_file_location ( ) const

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