RTI Connext Traditional C++ API
Version 6.1.1
|
Iterator for collections of Offsets. More...
#include <SequenceIterator.hpp>
Public Types | |
typedef std::forward_iterator_tag | iterator_category |
The iterator category. More... | |
typedef E | value_type |
The element type. More... | |
typedef value_type | reference |
The reference type is the same as the value type, an Offset. More... | |
typedef value_type | pointer |
The pointer type is the same as the value type, an Offset. More... | |
typedef std::ptrdiff_t | difference_type |
The difference type. More... | |
Public Member Functions | |
SequenceIterator () | |
Constructs an invalid iterator. More... | |
bool | is_null () const |
Returns whether the iterator is invalid. More... | |
value_type | operator* () const |
Returns the Offset of the current element. More... | |
value_type | operator-> () const |
Returns the Offset of the current element. More... | |
bool | advance () |
Advances to the next element, reporting any errors by returning false. More... | |
SequenceIterator & | operator++ () |
Advances to the next element. More... | |
SequenceIterator | operator++ (int) |
Advances to the next element. More... | |
Friends | |
bool | operator< (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. More... | |
bool | operator> (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. More... | |
bool | operator<= (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. More... | |
bool | operator>= (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. More... | |
bool | operator== (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. More... | |
bool | operator!= (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. More... | |
Iterator for collections of Offsets.
E | The Offset type of the elements |
OffsetKind | (implementation detail) |
auto
).A SequenceIterator moves through the Offset to elements of a sequence or array Offset, and provides the functionality of a standard forward_iterator
.
Note that a dereferenced SequenceIterator returns by value the Offset to the current element; it doesn't return it by reference.
Since the Traditional C++ API doesn't use exceptions, it is recommended to use the function advance() instead of operator++ to check for errors
typedef std::forward_iterator_tag rti::flat::SequenceIterator< E, OffsetKind >::iterator_category |
The iterator category.
typedef E rti::flat::SequenceIterator< E, OffsetKind >::value_type |
The element type.
typedef value_type rti::flat::SequenceIterator< E, OffsetKind >::reference |
The reference type is the same as the value type, an Offset.
typedef value_type rti::flat::SequenceIterator< E, OffsetKind >::pointer |
The pointer type is the same as the value type, an Offset.
typedef std::ptrdiff_t rti::flat::SequenceIterator< E, OffsetKind >::difference_type |
The difference type.
|
inline |
Constructs an invalid iterator.
|
inline |
Returns whether the iterator is invalid.
|
inline |
Returns the Offset of the current element.
|
inline |
Returns the Offset of the current element.
|
inline |
Advances to the next element, reporting any errors by returning false.
Since the Traditional C++ API doesn't support exceptions, this function is recommended instead of operator++.
Referenced by rti::flat::SequenceOffset< ElementOffset >::element_count(), and rti::flat::AbstractAlignedList< ElementOffset >::end().
|
inline |
Advances to the next element.
|
inline |
Advances to the next element.
|
friend |
Compares two iterators.
|
friend |
Compares two iterators.
|
friend |
Compares two iterators.
|
friend |
Compares two iterators.
|
friend |
Compares two iterators.
|
friend |
Compares two iterators.