A simple wrapper around the SettingsPersistenceInterface and cached local state to keep them in sync.
More...
#include <src/windows/include/display_device/windows/persistent_state.h>
A simple wrapper around the SettingsPersistenceInterface and cached local state to keep them in sync.
◆ PersistentState()
| display_device::PersistentState::PersistentState |
( |
std::shared_ptr< SettingsPersistenceInterface > | settings_persistence_api, |
|
|
bool | throw_on_load_error = false ) |
|
explicit |
Default constructor for the class.
- Parameters
-
| settings_persistence_api | [Optional] A pointer to the Settings Persistence interface. |
| throw_on_load_error | Specify whether to throw exception in constructor in case settings fail to load. |
◆ getState()
Get cached state.
- Returns
- Cached state
◆ persistState()
Store the new state via the interface and cache it.
- Parameters
-
| state | New state to be set. |
- Returns
- True if the state was succesfully updated, false otherwise.
The documentation for this class was generated from the following files: