![]() |
libdisplaydevice latest
C++ library to modify display devices.
|
Implementation of the SettingsPersistenceInterface, that saves/loads the persistent settings to/from the file. More...
#include <src/common/include/display_device/file_settings_persistence.h>
Public Member Functions | |
| bool | clear () override |
| FileSettingsPersistence (std::filesystem::path filepath) | |
| std::optional< std::vector< std::uint8_t > > | load () const override |
| bool | store (const std::vector< std::uint8_t > &data) override |
Public Member Functions inherited from display_device::SettingsPersistenceInterface | |
| virtual | ~SettingsPersistenceInterface ()=default |
| Default virtual destructor. | |
Implementation of the SettingsPersistenceInterface, that saves/loads the persistent settings to/from the file.
|
explicit |
Default constructor. Does not perform any operations on the file yet.
| filepath | A non-empty filepath. Throws on empty. |
|
nodiscardoverridevirtual |
Remove the file specified in constructor (if it exists).
Implements display_device::SettingsPersistenceInterface.
|
nodiscardoverridevirtual |
Read the data from the file specified in constructor.
Implements display_device::SettingsPersistenceInterface.
|
nodiscardoverridevirtual |
Store the data in the file specified in constructor.
Implements display_device::SettingsPersistenceInterface.