mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-05-06 17:51:36 +02:00
Added a setter to Settings.
This commit is contained in:
parent
2db1a0693e
commit
86f19a3353
@ -58,6 +58,10 @@ bool Settings::get_value_bool(const String &key, const bool def) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Settings::set_value(const String &key, const Variant &value) {
|
||||||
|
_data[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
void Settings::parse_ini_file(const String &path) {
|
void Settings::parse_ini_file(const String &path) {
|
||||||
FILE *f = fopen(path.c_str(), "r");
|
FILE *f = fopen(path.c_str(), "r");
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ public:
|
|||||||
double get_value_double(const String &key, const double def = 0);
|
double get_value_double(const String &key, const double def = 0);
|
||||||
bool get_value_bool(const String &key, const bool def = false);
|
bool get_value_bool(const String &key, const bool def = false);
|
||||||
|
|
||||||
|
void set_value(const String &key, const Variant &value);
|
||||||
|
|
||||||
void parse_ini_file(const String &path);
|
void parse_ini_file(const String &path);
|
||||||
|
|
||||||
static Settings *get_singleton();
|
static Settings *get_singleton();
|
||||||
|
Loading…
Reference in New Issue
Block a user