26 class storage :
private boost::noncopyable
32 using value_map_type = std::unordered_map<std::string, std::variant<bool, std::uint32_t, std::string>>;
52 [[nodiscard]] std::optional<bool>
get_bool(
const std::filesystem::path& key)
const;
60 void set_bool(
const std::filesystem::path& key,
bool value);
69 [[nodiscard]] std::optional<std::uint32_t>
get_uint32(
const std::filesystem::path& key)
const;
77 void set_uint32(
const std::filesystem::path& key, std::uint32_t value);
86 [[nodiscard]] std::optional<std::string>
get_string(
const std::filesystem::path& key)
const;
94 void set_string(
const std::filesystem::path& key,
const std::string& value);
131 const std::unique_ptr<impl> m_p_impl;
136 virtual std::optional<bool> get_bool_impl(
const std::filesystem::path& key)
const;
138 virtual void set_bool_impl(
const std::filesystem::path& key,
bool value);
140 virtual std::optional<std::uint32_t> get_uint32_impl(
const std::filesystem::path& key)
const;
142 virtual void set_uint32_impl(
const std::filesystem::path& key, std::uint32_t value);
144 virtual std::optional<std::string> get_string_impl(
const std::filesystem::path& key)
const;
146 virtual void set_string_impl(
const std::filesystem::path& key,
const std::string& value);
148 virtual void save_impl()
const = 0;
std::unordered_map< std::string, std::variant< bool, std::uint32_t, std::string > > value_map_type
The value map type.
Definition storage.hpp:32