Settings container

This commit is contained in:
Dan Paulat 2022-12-07 00:09:17 -06:00
parent 08b1d6e152
commit 1ad67de71b
7 changed files with 251 additions and 14 deletions

View file

@ -26,14 +26,16 @@ public:
std::string name() const;
T GetValue() const;
bool SetValue(const T& value);
bool SetValueOrDefault(const T& value);
void SetValueToDefault();
T GetValue() const;
bool SetValue(const T& value);
virtual bool SetValueOrDefault(const T& value);
void SetValueToDefault();
bool StageValue(const T& value);
void Commit();
virtual bool Validate(const T& value) const;
T GetDefault() const;
void SetDefault(const T& value);
@ -50,6 +52,9 @@ private:
template class SettingsVariable<bool>;
template class SettingsVariable<int64_t>;
template class SettingsVariable<std::string>;
// Containers are not to be used directly
template class SettingsVariable<std::vector<int64_t>>;
#endif
} // namespace settings