![]() |
|
A read-only iterator over values held by a VdfVector. More...
#include <vectorIterator.h>
Public Member Functions | |
| VdfVectorIterator ()=default | |
| Construct an iterator that is at end and not associated with a vector. | |
| VdfVectorIterator (const VdfVectorIterator &)=delete | |
| VdfVectorIterator & | operator= (const VdfVectorIterator &)=delete |
| bool | IsAtEnd () const |
Returns true if this does not point to an element in the vector. | |
| VdfVectorIterator & | operator++ () |
| Advances the iterator to the next data element. | |
| const T & | operator* () const |
| Returns the data element pointed to by this. | |
| bool | AdvanceTo (size_t idx) |
Advances this to a data element at or past idx. | |
Friends | |
| class | VdfVector |
A read-only iterator over values held by a VdfVector.
Definition at line 24 of file vectorIterator.h.
|
default |
Construct an iterator that is at end and not associated with a vector.
|
inline |
Advances this to a data element at or past idx.
Returns true if this points exactly at idx after advancing. Because compressed vectors have gaps in their indices, a false return value indicates that the iterator advanced past idx, without necessarily having advanced to the end.
As an example, the following code copies every 5th data element if it exists in the source vector:
Definition at line 121 of file vectorIterator.h.
|
inline |
Returns true if this does not point to an element in the vector.
Definition at line 37 of file vectorIterator.h.
|
inline |
Returns the data element pointed to by this.
Definition at line 46 of file vectorIterator.h.
|
inline |
Advances the iterator to the next data element.
Definition at line 103 of file vectorIterator.h.
|
friend |
Definition at line 74 of file vectorIterator.h.