swimming_pool/swimming_pool/Settings/app_setting_manager.cpp
void app_setting_manager::add_or_update_value (std::string const& key, std::string const& value)
{
    app_setting* setting = find(key);
    
    if (setting == nullptr) {
        // add a new setting
        add_value(key, value);
    } else {
        // update the existing setting
        setting->value = value;
    }
    
    save_and_reload();
}
/*
 * Function ADDS new app_setting object if object with such a key DOESN'T exist
 *       OR UPDATES value of the existing setting if object with such a key EXISTS
 */
Function ADDS new app_setting object if object with such a key DOESN'T exist
OR UPDATES value of the existing setting if object with such a key EXISTS
Function ADDS new app_setting object if object with such a key DOESN ' T exist OR UPDATES value of the existing setting if object with such a key EXISTS
void app_setting_manager::add_or_update_value (std::string const& key, std::string const& value)
{
    app_setting* setting = find(key);
    if (setting == nullptr) {
        add_value(key, value);
    } else {
        setting->value = value;
    }
    save_and_reload();
}
void app_setting_manager :: add_or_update_value ( std :: string const & key , std :: string const & value ) { app_setting * setting = find ( key ) ; if ( setting == nullptr ) { add_value ( key , value ) ; } else { setting -> value = value ; } save_and_reload ( ) ; }
Function ADDS new app_setting object if object with such a key DOESN'T exist
       OR UPDATES value of the existing setting if object with such a key EXISTS
Function ADDS new app_setting object if object with such a key DOESN ' T exist OR UPDATES value of the existing setting if object with such a key EXISTS
// add a new setting // update the existing setting