Arduino KVComm
master
Key-Value pair communication library for Arduino
|
#include <KVComm/KV_Iterator.hpp>
Public Types | |
using | difference_type = void |
using | value_type = KV |
using | pointer = KV * |
using | reference = KV & |
using | iterator_category = std::input_iterator_tag |
Public Member Functions | |
iterator () | |
Default constructor. Used as "end" iterator (sentinel). More... | |
iterator (const uint8_t *buffer, size_t length) | |
Create KV_Iterator that iterates over the elements in the buffer. More... | |
iterator & | operator++ () |
Advance the iterator. More... | |
bool | operator!= (const iterator &other) const |
Compare the iterator to the "end" iterator. More... | |
const KV & | operator* () const |
const KV * | operator-> () const |
operator bool () const | |
Check if the iterator is valid. More... | |
Protected Member Functions | |
void | checkLength () |
Private Attributes | |
KV | kv |
size_t | remainingBufferLength |
Definition at line 268 of file KV_Iterator.hpp.
using difference_type = void |
Definition at line 295 of file KV_Iterator.hpp.
using value_type = KV |
Definition at line 296 of file KV_Iterator.hpp.
Definition at line 297 of file KV_Iterator.hpp.
Definition at line 298 of file KV_Iterator.hpp.
using iterator_category = std::input_iterator_tag |
Definition at line 299 of file KV_Iterator.hpp.
iterator | ( | ) |
Default constructor. Used as "end" iterator (sentinel).
Definition at line 19 of file KV_Iterator.cpp.
iterator | ( | const uint8_t * | buffer, |
size_t | length | ||
) |
Create KV_Iterator that iterates over the elements in the buffer.
Only the pointer is saved, the buffer itself is not copied over, so its lifetime must be longer than all iterators that point to it.
Definition at line 21 of file KV_Iterator.cpp.
KV_Iterator::iterator & operator++ | ( | ) |
Advance the iterator.
Definition at line 26 of file KV_Iterator.cpp.
bool operator!= | ( | const iterator & | other | ) | const |
Compare the iterator to the "end" iterator.
(Only compares the buffer pointer, which is nullptr for the "end" iterator.)
Definition at line 36 of file KV_Iterator.cpp.
|
inline |
Definition at line 289 of file KV_Iterator.hpp.
|
inline |
Definition at line 290 of file KV_Iterator.hpp.
|
inlineexplicit |
Check if the iterator is valid.
Definition at line 293 of file KV_Iterator.hpp.
|
protected |
Definition at line 47 of file KV_Iterator.cpp.
|
private |
Definition at line 305 of file KV_Iterator.hpp.
|
private |
Definition at line 306 of file KV_Iterator.hpp.