Arduino KVComm  master
Key-Value pair communication library for Arduino
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
KV_Iterator Class Reference

Class for iterating over a dictionary generated by the KV_Builder, used for parsing and for checking if a key is already in the entry. More...

#include <KVComm/KV_Iterator.hpp>

Collaboration diagram for KV_Iterator:

Classes

class  iterator
 
class  KV
 

Public Member Functions

 KV_Iterator (const uint8_t *buffer, size_t length)
 
iterator begin () const
 Iterator to the first key-value entry of the dictionary. More...
 
iterator find (const char *key) const
 Find the entry with the given key (iterates over entire dictionary). More...
 

Static Public Member Functions

static iterator end ()
 End/sentinel iterator. More...
 

Private Attributes

const uint8_t * buffer
 
size_t bufferSize
 

Detailed Description

Class for iterating over a dictionary generated by the KV_Builder, used for parsing and for checking if a key is already in the entry.

Examples
KVComm-Receive.ino.

Definition at line 42 of file KV_Iterator.hpp.

Constructor & Destructor Documentation

◆ KV_Iterator()

KV_Iterator ( const uint8_t *  buffer,
size_t  length 
)
inline

Definition at line 44 of file KV_Iterator.hpp.

Member Function Documentation

◆ begin()

iterator begin ( ) const
inline

Iterator to the first key-value entry of the dictionary.

Definition at line 310 of file KV_Iterator.hpp.

◆ end()

static iterator end ( )
inlinestatic

End/sentinel iterator.

Definition at line 312 of file KV_Iterator.hpp.

◆ find()

KV_Iterator::iterator find ( const char *  key) const

Find the entry with the given key (iterates over entire dictionary).

Definition at line 75 of file KV_Iterator.cpp.

Member Data Documentation

◆ buffer

const uint8_t* buffer
private

Definition at line 318 of file KV_Iterator.hpp.

◆ bufferSize

size_t bufferSize
private

Definition at line 319 of file KV_Iterator.hpp.


The documentation for this class was generated from the following files: