SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
|
Interface for saveable objects. More...
#include <sensesp/system/saveable.h>
Public Member Functions | |
Saveable (const String &config_path) | |
virtual bool | load () |
Load and populate the object from a persistent storage. | |
virtual bool | refresh () |
Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state. | |
virtual bool | save () |
Save the object to a persistent storage. | |
virtual bool | clear () |
Delete the data from a persistent storage. | |
const String & | get_config_path () const |
Protected Attributes | |
const String | config_path_ |
Interface for saveable objects.
Saveable objects can be saved and loaded from a persistent storage.
Definition at line 18 of file saveable.h.
|
inline |
Definition at line 20 of file saveable.h.
|
inlinevirtual |
Delete the data from a persistent storage.
Reimplemented in sensesp::FileSystemSaveable.
Definition at line 53 of file saveable.h.
|
inline |
Definition at line 55 of file saveable.h.
|
inlinevirtual |
Load and populate the object from a persistent storage.
Reimplemented in sensesp::FileSystemSaveable.
Definition at line 28 of file saveable.h.
|
inlinevirtual |
Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state.
This is useful when the object's state may have changed outside of the object's control.
Definition at line 39 of file saveable.h.
|
inlinevirtual |
Save the object to a persistent storage.
Reimplemented in sensesp::FileSystemSaveable.
Definition at line 46 of file saveable.h.
|
protected |
Definition at line 58 of file saveable.h.