MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Public Member Functions | List of all members
mip::PacketView::FieldIterator Class Reference

#include <mip_packet.hpp>

Public Member Functions

 FieldIterator ()
 Empty iterator, which represents the "end" iterator of a packet. More...
 
 FieldIterator (const FieldView &first)
 
bool operator== (const FieldIterator &other) const
 
bool operator!= (const FieldIterator &other) const
 
bool operator== (std::nullptr_t) const
 
bool operator!= (std::nullptr_t) const
 
const FieldViewoperator* () const
 Dereference the iterator as a Field instance. More...
 
FieldIteratoroperator++ ()
 Advance to the next field. More...
 

Detailed Description

Iterator class for use with the range-based for loop or iterators.

You should generally use the begin()/end() functions on the PacketRef class instead of using this class directly.

Constructor & Destructor Documentation

◆ FieldIterator() [1/2]

mip::PacketView::FieldIterator::FieldIterator ( )
inline

Empty iterator, which represents the "end" iterator of a packet.

◆ FieldIterator() [2/2]

mip::PacketView::FieldIterator::FieldIterator ( const FieldView first)
inline

Create an iterator given the first field to iterate in a packet. Technically this can be any field, not just the first field.

Member Function Documentation

◆ operator!=() [1/2]

bool mip::PacketView::FieldIterator::operator!= ( const FieldIterator other) const
inline

◆ operator!=() [2/2]

bool mip::PacketView::FieldIterator::operator!= ( std::nullptr_t  ) const
inline

◆ operator*()

const FieldView& mip::PacketView::FieldIterator::operator* ( ) const
inline

Dereference the iterator as a Field instance.

◆ operator++()

FieldIterator& mip::PacketView::FieldIterator::operator++ ( )
inline

Advance to the next field.

◆ operator==() [1/2]

bool mip::PacketView::FieldIterator::operator== ( const FieldIterator other) const
inline

Comparison between any two iterators. This works even for iterators over different packets, which will never be the same (except all null/end iterators are equivalent).

◆ operator==() [2/2]

bool mip::PacketView::FieldIterator::operator== ( std::nullptr_t  ) const
inline

Comparison with std::nullptr is checking if the iterator points to a valid field (i.e. not the end).


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