28#include <unordered_map>
61 static std::unordered_map<std::string, std::string>
63 static std::mutex _mutex;
84 void setItem(
const std::string &key,
const std::string &value)
override;
92 std::optional<std::string>
getItem(
const std::string &key)
override;
~SessionStorage(void) override=default
Destroy the handle. The items are kept.
void removeItem(const std::string &key) override
Delete the item stored under a key. Does nothing when there is none.
void clear(void) override
Delete every session item of the process, including those written through other SessionStorage object...
SessionStorage(void)=default
Create a handle on the process-wide session items.
void setItem(const std::string &key, const std::string &value) override
Store a string under a key, replacing the item already stored under that key, if any.
std::optional< std::string > getItem(const std::string &key) override
Read the text stored under a key.
A key-value store of strings, modelled on the web Storage API (setItem, getItem, removeItem,...
virtual void setItem(const std::string &key, const std::string &value)=0
Store a string under a key, replacing the item already stored under that key, if any.
A C++20 UI framework for desktop and XR, built as an entity-component-system.