semf
|
Implementation of a forward 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 | |
Iterator ()=default | |
Iterator (T *element) | |
Constructor with member variable initialization. More... | |
virtual | ~Iterator ()=default |
T & | operator* () const |
Returns the reference of the element the iterator's position. More... | |
T * | operator-> () const |
Returns the pointer into the element the iterator's position. More... | |
Iterator & | operator++ () |
Iterates to the next element in the list. More... | |
Iterator | operator++ (int) |
Iterates to the next element in the queue. More... | |
bool | operator== (const Iterator &other) const |
Compares this element with that element. More... | |
bool | operator!= (const Iterator &other) const |
Compares this element with that element. More... | |
Implementation of a forward iterator for LinkedQueue
.
Definition at line 89 of file linkedqueue.h.
using semf::LinkedQueue< T >::Iterator::difference_type = std::ptrdiff_t |
Definition at line 94 of file linkedqueue.h.
using semf::LinkedQueue< T >::Iterator::iterator_category = std::forward_iterator_tag |
Definition at line 92 of file linkedqueue.h.
using semf::LinkedQueue< T >::Iterator::pointer = T* |
Definition at line 95 of file linkedqueue.h.
using semf::LinkedQueue< T >::Iterator::refernce = T& |
Definition at line 96 of file linkedqueue.h.
using semf::LinkedQueue< T >::Iterator::value_type = T |
Definition at line 93 of file linkedqueue.h.
|
default |
|
inlineexplicit |
Constructor with member variable initialization.
element | Pointer to the element starting iterating. |
Definition at line 103 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 168 of file linkedqueue.h.
|
inline |
Returns the reference of the element the iterator's position.
LinkedQueue::end
) leads to undefined behavior. Definition at line 115 of file linkedqueue.h.
|
inline |
Iterates to the next element in the list.
LinkedQueue::end
) leads to undefined behavior. Definition at line 135 of file linkedqueue.h.
|
inline |
Iterates to the next element in the queue.
LinkedQueue::end
) leads to undefined behavior. Definition at line 146 of file linkedqueue.h.
|
inline |
Returns the pointer into the element the iterator's position.
LinkedQueue::end
) leads to undefined behavior. Definition at line 125 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 158 of file linkedqueue.h.