21 #ifndef SAYONARA_SETTINGS_H_ 22 #define SAYONARA_SETTINGS_H_ 24 #include "Utils/Settings/SettingKey.h" 25 #include "Utils/Settings/Setting.h" 26 #include "Utils/Settings/SettingNotifier.h" 27 #include "Utils/Singleton.h" 31 using SettingArray=std::array<AbstrSetting*, static_cast<unsigned int>(SettingKey::Num_Setting_Keys)>;
46 const SettingArray& settings();
52 bool check_settings();
55 template<
typename KeyClass>
56 const typename KeyClass::Data&
get()
const 59 SettingPtr s =
static_cast<SettingPtr
>( setting(KeyClass::key) );
64 template<
typename KeyClass>
65 void set(
const typename KeyClass::Data& val)
68 SettingPtr s =
static_cast<SettingPtr
>( setting(KeyClass::key) );
70 if( s->assign_value(val))
78 template<
typename KeyClass>
90 #endif // SAYONARA_SETTINGS_H_ The Setting class T is the pure value type e.g. QString.
Definition: Setting.h:74
Definition: SettingNotifier.h:47
The Settings class.
Definition: Settings.h:37
The AbstrSetting class Every setting needs a key and a value The SettingKey is only used inside the s...
Definition: Setting.h:37