#include <bidilist.hpp>
Implementation of std::iterator for types BidiNode and BidiList.
As the name of the class indicates, this iterator satisfies the C++ standard library concept BidirectionalIterator .
| TConstOrMutableElement | The "final" element type that by contract is derived from struct BidiNode in either constant or mutable version. |
Definition at line 25 of file bidilist.hpp.
Public Types | |
| using | TMutableNode = BidiNode< typename std::remove_const< TConstOrMutableElement >::type > |
Public Methods | |
| BidiListIterator () noexcept=default | |
| template<typename TMutable > | |
| BidiListIterator (const TMutable &mutableIt) | |
| BidiListIterator (TConstOrMutableElement *start) noexcept | |
| bool | operator!= (BidiListIterator other) const noexcept |
| TConstOrMutableElement & | operator* () const |
| BidiListIterator & | operator++ () noexcept |
| BidiListIterator | operator++ (int) noexcept |
| BidiListIterator & | operator-- () |
| BidiListIterator | operator-- (int) |
| TConstOrMutableElement * | operator-> () const |
| BidiListIterator & | operator= (TConstOrMutableElement *elem) noexcept |
| bool | operator== (BidiListIterator other) const noexcept |
Private Fields | |
| TConstOrMutableElement * | element |
| using TMutableNode = BidiNode<typename std::remove_const<TConstOrMutableElement>::type> |
The element type: either const or mutable Element.
Definition at line 204 of file bidilist.hpp.
|
defaultnoexcept |
Default constructor creating an invalid iterator.
|
inlinenoexcept |
Constructor.
| start | Pointer to the initial element. |
Definition at line 218 of file bidilist.hpp.
|
inline |
Copy constructor accepting a mutable iterator. Available only for the constant version of this iterator.
| TMutable | The type of this constructor's argument. |
| mutableIt | Mutable iterator to copy from. |
|
inlinenoexcept |
Comparison operator.
| other | The iterator to compare ourselves to. |
true if this and given iterator are not equal, false otherwise. Definition at line 281 of file bidilist.hpp.
|
inline |
Retrieves a reference to the referred element.
Definition at line 309 of file bidilist.hpp.
|
inlinenoexcept |
Prefix increment operator.
Definition at line 256 of file bidilist.hpp.
|
inlinenoexcept |
Postfix increment operator.
Definition at line 264 of file bidilist.hpp.
|
inline |
Prefix decrement operator.
Definition at line 290 of file bidilist.hpp.
|
inline |
Postfix decrement operator.
Definition at line 298 of file bidilist.hpp.
|
inline |
Retrieves a pointer to the referred element.
Definition at line 316 of file bidilist.hpp.
|
inlinenoexcept |
Assign operator from element type.
| elem | The element to refer to. |
this. Definition at line 243 of file bidilist.hpp.
|
inlinenoexcept |
Comparison operator.
| other | The iterator to compare ourselves to. |
true if this and the given iterator are pointing to the same element, false otherwise. Definition at line 273 of file bidilist.hpp.
|
private |
The start of the list.
Definition at line 208 of file bidilist.hpp.