|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The framework's store: a map held in memory, on its own strand. More...
#include <preferences.hpp>
Public Member Functions | |
| MemoryPreferencesStore (exec::IExecutor &base) | |
A store whose strand runs on base. | |
| async::Completion< std::optional< std::string > > | get (PrefKey const &key) override |
| Reads a choice. | |
| async::Completion< bool > | set (PrefKey const &key, std::string json) override |
| Writes a choice. | |
| async::Completion< bool > | remove (PrefKey const &key) override |
| Forgets a choice. | |
| Public Member Functions inherited from morph::ui::IPreferencesStore | |
| IPreferencesStore (IPreferencesStore const &)=delete | |
| IPreferencesStore & | operator= (IPreferencesStore const &)=delete |
| IPreferencesStore (IPreferencesStore &&)=delete | |
| IPreferencesStore & | operator= (IPreferencesStore &&)=delete |
The framework's store: a map held in memory, on its own strand.
Its entries last as long as it does. Each call is a task on the strand, and its completion is delivered there.
Definition at line 79 of file preferences.hpp.
|
inlineexplicit |
A store whose strand runs on base.
| base | Where the strand's tasks run. Borrowed: it must outlive the store. |
Definition at line 83 of file preferences.hpp.
|
inlinenodiscardoverridevirtual |
Reads a choice.
| key | The entry. |
Implements morph::ui::IPreferencesStore.
Definition at line 88 of file preferences.hpp.
|
inlinenodiscardoverridevirtual |
Writes a choice.
| key | The entry. |
| json | Its JSON text. |
Implements morph::ui::IPreferencesStore.
Definition at line 101 of file preferences.hpp.
|
inlinenodiscardoverridevirtual |
Forgets a choice.
| key | The entry. |
Implements morph::ui::IPreferencesStore.
Definition at line 113 of file preferences.hpp.