Implement discard functionality for line settings

This commit is contained in:
Dan Paulat 2024-09-22 09:54:32 -05:00
parent 6063de2095
commit 76809de2df
7 changed files with 89 additions and 7 deletions

View file

@ -19,7 +19,7 @@ class SettingsVariableBase
{
protected:
explicit SettingsVariableBase(const std::string& name);
~SettingsVariableBase();
virtual ~SettingsVariableBase();
public:
SettingsVariableBase(const SettingsVariableBase&) = delete;
@ -48,6 +48,11 @@ public:
*/
virtual bool Commit() = 0;
/**
* Clears the staged value of the settings variable.
*/
virtual void Reset() = 0;
/**
* Reads the value from the JSON object. If the read value is out of range,
* the value is set to the minimum or maximum. If the read value fails