semf
|
Implementation of a forward constant iterator for LinkedQueue
.
More...
#include <linkedqueue.h>
Public Types | |
using | iterator_category = std::forward_iterator_tag |
using | value_type = T |
using | difference_type = std::ptrdiff_t |
using | pointer = T * |
using | refernce = T & |
Public Member Functions | |
ConstIterator ()=default | |
ConstIterator (const T *element) | |
Constructor with member variable initialization. More... | |
ConstIterator (const Iterator &iterator) | |
Copy constructor. More... | |
virtual | ~ConstIterator ()=default |
const T & | operator* () const |
Returns the reference of the element the iterator's position. More... | |
const T * | operator-> () const |
Returns the pointer into the element the iterator's position. More... | |
ConstIterator & | operator++ () |
Iterates to the next element in the queue. More... | |
ConstIterator | operator++ (int) |
Iterates to the next element in the queue. More... | |
bool | operator== (const ConstIterator &other) const |
Compares this element with that element. More... | |
bool | operator!= (const ConstIterator &other) const |
Compares this element with that element. More... | |
Implementation of a forward constant iterator for LinkedQueue
.
Definition at line 181 of file linkedqueue.h.
using semf::LinkedQueue< T >::ConstIterator::difference_type = std::ptrdiff_t |
Definition at line 186 of file linkedqueue.h.
using semf::LinkedQueue< T >::ConstIterator::iterator_category = std::forward_iterator_tag |
Definition at line 184 of file linkedqueue.h.
using semf::LinkedQueue< T >::ConstIterator::pointer = T* |
Definition at line 187 of file linkedqueue.h.
using semf::LinkedQueue< T >::ConstIterator::refernce = T& |
Definition at line 188 of file linkedqueue.h.
using semf::LinkedQueue< T >::ConstIterator::value_type = T |
Definition at line 185 of file linkedqueue.h.
|
default |
|
inlineexplicit |
Constructor with member variable initialization.
element | Pointer to the element starting iterating. |
Definition at line 195 of file linkedqueue.h.
|
inlineexplicit |
Copy constructor.
iterator | iterator to copy from. |
Definition at line 203 of file linkedqueue.h.
|
virtualdefault |
|
inline |
Compares this
element with that
element.
other | Iterator to compare. |
true
for both iterators are different elements; false
for both iterators are the same element. Definition at line 268 of file linkedqueue.h.
|
inline |
Returns the reference of the element the iterator's position.
LinkedQueue::end
) leads to undefined behavior. Definition at line 215 of file linkedqueue.h.
|
inline |
Iterates to the next element in the queue.
LinkedQueue::end
) leads to undefined behavior. Definition at line 235 of file linkedqueue.h.
|
inline |
Iterates to the next element in the queue.
LinkedQueue::end
) leads to undefined behavior. Definition at line 246 of file linkedqueue.h.
|
inline |
Returns the pointer into the element the iterator's position.
LinkedQueue::end
) leads to undefined behavior. Definition at line 225 of file linkedqueue.h.
|
inline |
Compares this
element with that
element.
other | Iterator to compare. |
true
for both iterator's position is the same element; false
for both iterator's position are different elements. Definition at line 258 of file linkedqueue.h.