![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Scheduling - Persistent Storage API. More...
#include <scheduling.h>
Public Types | |
typedef Entry< _Type > | EntryType |
Entry helper type. More... | |
typedef Common::Pointer< EntryType > | EntryPointer |
Entry pointer helper. More... | |
Public Member Functions | |
virtual Common::Result | save (const EntryType &entry)=0 |
Store the given entry to persistent storage. More... | |
virtual void | clear (void)=0 |
Erase all the DB entries. | |
virtual EntryPointer | find (uint8_t id) const =0 |
Find the Event with the given id. More... | |
virtual uint8_t | next_id () const =0 |
Return next available id for event. More... | |
virtual void | for_each (std::function< void(EntryType &e)> func)=0 |
Call the given function with each entry in the DB as argument. More... | |
![]() | |
virtual uint16_t | size () const=0 |
Return the number of entries in the container. More... | |
virtual Result | save (const Entry< _Type > &entry)=0 |
Store the given entry to persistent storage. More... | |
virtual Result | destroy (const Entry< _Type > &entry)=0 |
Destroy the given entry in the persistent storage. More... | |
Scheduling - Persistent Storage API.
_Type | the specific type of the scheduling entry. |
Definition at line 483 of file scheduling.h.
typedef Common::Pointer<EntryType> HF::Core::Scheduling::IEntries< _Type >::EntryPointer |
Entry pointer helper.
Definition at line 486 of file scheduling.h.
typedef Entry<_Type> HF::Core::Scheduling::IEntries< _Type >::EntryType |
Entry helper type.
Definition at line 485 of file scheduling.h.
|
pure virtual |
Find the Event with the given id.
[in] | id | Event ID to search for. |
id
, nullptr
otherwise. Implemented in HF::Core::Scheduling::Entries< _Type >.
|
pure virtual |
Call the given function with each entry in the DB as argument.
[in] | func | function to apply to all entries in the store. |
|
pure virtual |
Return next available id for event.
Scheduler::Entry::AVAILABLE_ID
if no id is available. Implemented in HF::Core::Scheduling::Entries< _Type >.
|
pure virtual |
Store the given entry
to persistent storage.
[in] | entry | the entry to save. |
Common::Result::OK | if the entry was saved, |
Common::Result::FAIL_ARG | if an entry already exists with the same ID, |
Common::Result::FAIL_UNKNOWN | otherwise. |
Implemented in HF::Core::Scheduling::Entries< _Type >.