esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Friends | List of all members
ndnph::Decoder::Iterator Class Reference

Iterator over TLV elements. More...

#include <decoder.hpp>

Inherited by ndnph::Name::Iterator.

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = const Tlv
 
using difference_type = std::ptrdiff_t
 
using pointer = value_type *
 
using reference = value_type &
 

Public Member Functions

 Iterator ()=default
 
 Iterator (const uint8_t *pos, const uint8_t *end)
 
bool hasError () const
 Whether a decoding error has occurred. More...
 
Iteratoroperator++ ()
 Increment to next TLV element. More...
 
Iterator operator++ (int)
 
reference operator* ()
 Obtain Decoder::Tlv. More...
 
pointer operator-> ()
 

Friends

bool operator== (const Iterator &lhs, const Iterator &rhs)
 

Detailed Description

Iterator over TLV elements.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

using ndnph::Decoder::Iterator::iterator_category = std::forward_iterator_tag

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ Iterator() [1/2]

ndnph::Decoder::Iterator::Iterator ( )
default

◆ Iterator() [2/2]

ndnph::Decoder::Iterator::Iterator ( const uint8_t *  pos,
const uint8_t *  end 
)
inlineexplicit

Member Function Documentation

◆ hasError()

bool ndnph::Decoder::Iterator::hasError ( ) const
inline

Whether a decoding error has occurred.

◆ operator*()

reference ndnph::Decoder::Iterator::operator* ( )
inline

Obtain Decoder::Tlv.

Dereferencing past-end iterator is allowed and returns empty Decoder::Tlv.

◆ operator++() [1/2]

Iterator& ndnph::Decoder::Iterator::operator++ ( )
inline

Increment to next TLV element.

Incrementing past-end iterator is allowed and has no effect.

◆ operator++() [2/2]

Iterator ndnph::Decoder::Iterator::operator++ ( int  )
inline

◆ operator->()

pointer ndnph::Decoder::Iterator::operator-> ( )
inline

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Iterator lhs,
const Iterator rhs 
)
friend

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