RTI Connext Traditional C++ API
Version 6.0.0
|
Iterator for collections of Offsets. More...
#include <SequenceIterator.hpp>
Public Types | |
typedef std::forward_iterator_tag | iterator_category |
The iterator category. | |
typedef E | value_type |
The element type. | |
typedef value_type | reference |
The reference type is the same as the value type, an Offset. | |
typedef value_type | pointer |
The pointer type is the same as the value type, an Offset. | |
typedef std::ptrdiff_t | difference_type |
The difference type. | |
Public Member Functions | |
SequenceIterator () | |
Constructs an invalid iterator. | |
bool | is_null () const |
Returns whether the iterator is invalid. | |
value_type | operator* () const |
Returns the Offset of the current element. | |
value_type | operator-> () const |
Returns the Offset of the current element. | |
bool | advance () |
Advances to the next element, reporting any errors by returning false. | |
SequenceIterator & | operator++ () |
Advances to the next element. | |
SequenceIterator | operator++ (int) |
Advances to the next element. | |
Friends | |
bool | operator< (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. | |
bool | operator> (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. | |
bool | operator<= (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. | |
bool | operator>= (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. | |
bool | operator== (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. | |
bool | operator!= (const SequenceIterator &s1, const SequenceIterator &s2) |
Compares two iterators. | |
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++.
|
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.