39bool load(
const std::string& path);
46bool has(
const std::string& key);
53std::optional<std::string>
get_string(
const std::string& key);
61std::optional<bool>
get_bool(
const std::string& key);
68std::optional<int>
get_int(
const std::string& key);
75std::optional<float>
get_float(
const std::string& key);
void _shutdown()
Remove all settings. Called by asw::core::shutdown().
std::optional< std::string > get_string(const std::string &key)
Get a setting as text.
constexpr const char * PATH_VARIABLE
Name of the environment variable that holds the config file path.
std::optional< float > get_float(const std::string &key)
Get a setting as a number.
bool has(const std::string &key)
Check if a setting is set.
std::optional< int > get_int(const std::string &key)
Get a setting as a whole number.
bool load(const std::string &path)
Load settings from a file. Settings already loaded stay, unless the file sets them again.
void _init()
Load the file named by ASW_CONFIG, if it is set. Called by asw::core::init() before the window opens.
std::optional< bool > get_bool(const std::string &key)
Get a setting as true or false. 1, true, yes and on are true. 0, false, no and off are false....