|
libcppwrap
A collection of C++ wrappers for native APIs
|
A forward iterator for linked lists. More...
#include <iterators.hpp>
Public Member Functions | |
| const_list_iterator () noexcept | |
| Constructs an end iterator. More... | |
| const_list_iterator (const ListNode *current) noexcept | |
| Constructs an iterator pointing to the specified linked list node. More... | |
| const_list_iterator & | operator++ () noexcept |
| Advances to the next linked list node. More... | |
| const ListNode & | operator* () const noexcept |
| Gets a reference to the linked list node pointed to by this iterator. More... | |
| const ListNode * | operator-> () const noexcept |
| Gets a pointer to the linked list node pointed to by this iterator. More... | |
| bool | operator== (const_list_iterator const &rhs) const noexcept |
Tests if this object and rhs point to the same linked list node. More... | |
| bool | operator!= (const_list_iterator const &rhs) const noexcept |
Tests if this object and rhs point to the same linked list node. More... | |
A forward iterator for linked lists.
| ListNode | The type of the linked list node. |
| Next | A mutator function which, given a pointer to a linked list node, returns a pointer to the next linked list node. |
|
inlinenoexcept |
Constructs an end iterator.
|
inlinenoexcept |
Constructs an iterator pointing to the specified linked list node.
| current | The linked list node to point to. |
|
inlinenoexcept |
Tests if this object and rhs point to the same linked list node.
| rhs | The other iterator to compare. |
true if and only if this object and rhs point to different linked list nodes.
|
inlinenoexcept |
Gets a reference to the linked list node pointed to by this iterator.
The behavior is undefined if this is an end iterator.
|
inlinenoexcept |
Advances to the next linked list node.
The behavior is undefined if this is an end iterator.
|
inlinenoexcept |
Gets a pointer to the linked list node pointed to by this iterator.
nullptr if this is an end iterator.
|
inlinenoexcept |
Tests if this object and rhs point to the same linked list node.
| rhs | The other iterator to compare. |
true if and only if this object and rhs point to the same linked list node.