SettingsInterface: Add support for string list settings

This commit is contained in:
Connor McLaughlin
2019-12-31 12:41:21 +10:00
parent dbf651e493
commit 98214a9327
3 changed files with 57 additions and 3 deletions

View File

@ -3,6 +3,8 @@
#include <array>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
class SettingsInterface
{
@ -17,6 +19,11 @@ public:
virtual void SetBoolValue(const char* section, const char* key, bool value) = 0;
virtual void SetStringValue(const char* section, const char* key, const char* value) = 0;
virtual std::vector<std::string> GetStringList(const char* section, const char* key) = 0;
virtual void SetStringList(const char* section, const char* key, const std::vector<std::string_view>& items) = 0;
virtual bool RemoveFromStringList(const char* section, const char* key, const char* item) = 0;
virtual bool AddToStringList(const char* section, const char* key, const char* item) = 0;
virtual void DeleteValue(const char* section, const char* key) = 0;
};