diff options
Diffstat (limited to 'src/SettingsRepositoryInterface.h')
-rw-r--r-- | src/SettingsRepositoryInterface.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/SettingsRepositoryInterface.h b/src/SettingsRepositoryInterface.h index 5f73c49c8..4547dfe19 100644 --- a/src/SettingsRepositoryInterface.h +++ b/src/SettingsRepositoryInterface.h @@ -3,8 +3,7 @@ class cSettingsRepositoryInterface { -public: - + public: enum errors { noID = -1, @@ -34,25 +33,36 @@ public: /** Adds a new value to the specified key. If a value of the same name already exists, creates another one */ - virtual void AddValue (const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value) = 0; + virtual void AddValue(const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value) = 0; /** returns a vector containing a name, value pair for each value under the key */ virtual std::vector<std::pair<AString, AString>> GetValues(AString a_keyName) = 0; /** Get the value at the specified key and value, returns defValue on failure */ - virtual AString GetValue (const AString & keyname, const AString & valuename, const AString & defValue = "") const = 0; + virtual AString GetValue(const AString & keyname, const AString & valuename, const AString & defValue = "") + const = 0; /** Gets the value; if not found, write the default to the repository */ - virtual AString GetValueSet (const AString & keyname, const AString & valuename, const AString & defValue = "") = 0; - virtual int GetValueSetI(const AString & keyname, const AString & valuename, const int defValue = 0) = 0; - virtual Int64 GetValueSetI(const AString & keyname, const AString & valuename, const Int64 defValue = 0) = 0; - virtual bool GetValueSetB(const AString & keyname, const AString & valuename, const bool defValue = false) = 0; + virtual AString GetValueSet(const AString & keyname, const AString & valuename, const AString & defValue = "") = 0; + virtual int GetValueSetI(const AString & keyname, const AString & valuename, const int defValue = 0) = 0; + virtual Int64 GetValueSetI(const AString & keyname, const AString & valuename, const Int64 defValue = 0) = 0; + virtual bool GetValueSetB(const AString & keyname, const AString & valuename, const bool defValue = false) = 0; /** Overwrites the value of the key, value pair Specify the optional parameter as false if you do not want the value created if it doesn't exist. Returns true if value set, false otherwise. */ - virtual bool SetValue (const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value, const bool a_CreateIfNotExists = true) = 0; - virtual bool SetValueI(const AString & a_KeyName, const AString & a_ValueName, const int a_Value, const bool a_CreateIfNotExists = true) = 0; + virtual bool SetValue( + const AString & a_KeyName, + const AString & a_ValueName, + const AString & a_Value, + const bool a_CreateIfNotExists = true + ) = 0; + virtual bool SetValueI( + const AString & a_KeyName, + const AString & a_ValueName, + const int a_Value, + const bool a_CreateIfNotExists = true + ) = 0; /** Deletes the specified key, value pair */ virtual bool DeleteValue(const AString & keyname, const AString & valuename) = 0; |