Ocean
|
Definition of an iterator allowing to iterate through the vector. More...
Public Member Functions | |
Iterator & | operator++ () |
(Pre-) increments this iterator. More... | |
Iterator | operator++ (int) |
(Post-) increments this iterator. More... | |
T & | operator* () |
De-references the iterator and provides access to the underlying element in the vector. More... | |
bool | operator== (const Iterator &iterator) const |
Compares two iterators and returns whether both iterators point to the same vector element. More... | |
bool | operator!= (const Iterator &iterator) const |
Compares two iterators and returns whether both iterators do not point to the same vector element. More... | |
Protected Member Functions | |
Iterator (StackHeapVector &vector, const size_t index) | |
Creates a new iterator pointing to a specified elements in the vector. More... | |
Protected Attributes | |
StackHeapVector & | vector_ |
The vector owning this iterator. More... | |
size_t | index_ = size_t(-1) |
The index of the element within the vector to which the iterator points. More... | |
Friends | |
class | StackHeapVector |
Definition of an iterator allowing to iterate through the vector.
The iterator allows to modified the element to which the iterator is pointing.
|
protected |
Creates a new iterator pointing to a specified elements in the vector.
vector | The vector owning this iterator |
index | The index of the element to which the iterator points |
bool Ocean::StackHeapVector< T, tStackCapacity >::Iterator::operator!= | ( | const Iterator & | iterator | ) | const |
Compares two iterators and returns whether both iterators do not point to the same vector element.
T & Ocean::StackHeapVector< T, tStackCapacity >::Iterator::operator* |
De-references the iterator and provides access to the underlying element in the vector.
StackHeapVector< T, tStackCapacity >::Iterator & Ocean::StackHeapVector< T, tStackCapacity >::Iterator::operator++ |
(Pre-) increments this iterator.
StackHeapVector< T, tStackCapacity >::Iterator Ocean::StackHeapVector< T, tStackCapacity >::Iterator::operator++ | ( | int | ) |
(Post-) increments this iterator.
bool Ocean::StackHeapVector< T, tStackCapacity >::Iterator::operator== | ( | const Iterator & | iterator | ) | const |
Compares two iterators and returns whether both iterators point to the same vector element.
|
friend |
|
protected |
The index of the element within the vector to which the iterator points.
|
protected |
The vector owning this iterator.