void Settings::initializeDefaults() { for(const auto &pair : DEFAULT_SETTINGS) { if(!containsSetting(pair.first)) setSetting(pair.first, pair.second); } }
/*! Adds or changes a setting \param key the key{name} of the setting. \param value the value of the setting. \param group the group of the setting. Value to organize settings. [Default value: "Default"] [optional parameter] Create a field with the key/setting if no key with that name. Otherwise the value will be replaced by the new one. */ void CnotiSettings::setSetting( const string key, const string value, const string group ) { CnotiSetting Setting = CnotiSetting(key, value, group); if (containsSetting(key, group)) { removeSetting(key, group); } _settings.push_back(Setting); }