![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Default implementation of the IEntries API. More...
#include <group_table.h>
Public Member Functions | |
uint16_t | size () const |
Return the number of entries in the container. More... | |
void | clear () |
Clear all entries in database. | |
void | for_each (uint16_t group, std::function< void(const Entry &)> func) const |
Call the given function for all the entries with given group address. More... | |
Entry const & | operator[] (uint8_t index) const |
Retrive the entry at the given index . More... | |
![]() | |
virtual Result | save (const Entry &entry)=0 |
Store the given entry to persistent storage. More... | |
virtual Result | destroy (const Entry &entry)=0 |
Destroy the given entry in the persistent storage. More... | |
Protected Member Functions | |
bool | any_of (uint16_t group, uint8_t unit) const |
Check if there exists any entry for the group/unit address given. More... | |
Protected Attributes | |
Container | db |
Group table entries database. More... | |
Default implementation of the IEntries API.
Definition at line 404 of file group_table.h.
|
protected |
Check if there exists any entry for the group/unit address given.
[in] | group | the group address to search for. |
[in] | unit | the unit ID to search for. |
true | if an entry exists, |
false | otherwise. |
|
virtual |
Call the given function for all the entries with given group
address.
[in] | group | group address to search for. |
[in] | func | function to apply to each member of the group. |
Implements HF::Core::GroupTable::IEntries.
|
inlinevirtual |
Retrive the entry at the given index
.
[in] | index | the index to retrive the entry from. |
Implements HF::Core::GroupTable::IEntries.
Definition at line 418 of file group_table.h.
References db.
|
virtual |
Return the number of entries in the container.
Implements HF::Common::IEntries< Entry >.
|
protected |
Group table entries database.
Definition at line 436 of file group_table.h.
Referenced by operator[]().