|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Iterator for traversing SkipList elements in ascending order. More...
#include <tpl_skipList.H>
Public Types | |
| using | Set_Type = SkipList |
Public Member Functions | |
| Iterator () noexcept=default | |
| Default constructor (invalid iterator). | |
| Iterator (const Iterator &) noexcept=default | |
| Iterator (const SkipList &list) noexcept | |
| Construct iterator positioned at first element. | |
| bool | has_curr () const noexcept |
| Check if iterator has a current element. | |
| bool | is_last () const noexcept |
| Check if iterator is on the last element. | |
| Node * | get_curr () const |
| Get current node (throws if no current). | |
| Node * | get_curr_ne () const noexcept |
| Get current node without exception check. | |
| const Key & | get_key () const |
| Get current key (throws if no current). | |
| const Type & | get_data () const |
| Get current data (throws if no current). | |
| void | next () |
| Advance to next element (throws if no current). | |
| void | next_ne () noexcept |
| Advance to next element without exception check. | |
| void | reset_first () noexcept |
| Reset iterator to first element. | |
| void | reset () noexcept |
| Reset iterator to first element (alias). | |
| Iterator & | operator= (const Iterator &it) noexcept |
| Assignment operator. | |
| bool | operator== (const Iterator &it) const noexcept |
| Equality comparison. | |
| bool | operator!= (const Iterator &it) const noexcept |
| Inequality comparison. | |
| Iterator & | operator++ () noexcept |
| Prefix increment operator. | |
| Iterator | operator++ (int) noexcept |
| Postfix increment operator. | |
| Node * | operator* () const |
| Dereference operator (returns node pointer). | |
| Node * | operator-> () const |
| Arrow operator (returns node pointer). | |
Private Attributes | |
| const SkipList * | list_ptr = nullptr |
| Node * | curr = nullptr |
Iterator for traversing SkipList elements in ascending order.
Provides forward iteration over all elements in the skip list. Elements are visited in key order (smallest to largest).
Usage:
Definition at line 487 of file tpl_skipList.H.
Definition at line 493 of file tpl_skipList.H.
|
defaultnoexcept |
Default constructor (invalid iterator).
|
defaultnoexcept |
|
inlinenoexcept |
Construct iterator positioned at first element.
| [in] | list | SkipList to iterate over. |
Definition at line 502 of file tpl_skipList.H.
|
inline |
Get current node (throws if no current).
| std::overflow_error | if no current element. |
Definition at line 526 of file tpl_skipList.H.
References ah_overflow_error_if.
|
inlinenoexcept |
Get current node without exception check.
Definition at line 535 of file tpl_skipList.H.
|
inline |
Get current data (throws if no current).
Definition at line 541 of file tpl_skipList.H.
References Aleph::get_curr().
|
inline |
Get current key (throws if no current).
Definition at line 538 of file tpl_skipList.H.
References Aleph::get_curr().
|
inlinenoexcept |
Check if iterator has a current element.
Definition at line 512 of file tpl_skipList.H.
|
inlinenoexcept |
Check if iterator is on the last element.
Definition at line 515 of file tpl_skipList.H.
References Aleph::SkipList< Key, Type >::Node::get_next(), and Aleph::next().
Advance to next element (throws if no current).
Definition at line 544 of file tpl_skipList.H.
References ah_overflow_error_if, and Aleph::next_ne().
|
inlinenoexcept |
Advance to next element without exception check.
Definition at line 551 of file tpl_skipList.H.
References Aleph::SkipList< Key, Type >::Node::get_next().
|
inlinenoexcept |
Inequality comparison.
Definition at line 589 of file tpl_skipList.H.
|
inline |
Dereference operator (returns node pointer).
Definition at line 610 of file tpl_skipList.H.
References Aleph::get_curr().
|
inlinenoexcept |
Prefix increment operator.
Definition at line 595 of file tpl_skipList.H.
References Aleph::next_ne().
|
inlinenoexcept |
Postfix increment operator.
Definition at line 602 of file tpl_skipList.H.
References Aleph::next_ne().
|
inline |
Arrow operator (returns node pointer).
Definition at line 613 of file tpl_skipList.H.
References Aleph::get_curr().
|
inlinenoexcept |
Assignment operator.
Definition at line 575 of file tpl_skipList.H.
|
inlinenoexcept |
Equality comparison.
Definition at line 583 of file tpl_skipList.H.
|
inlinenoexcept |
Reset iterator to first element (alias).
Definition at line 572 of file tpl_skipList.H.
|
inlinenoexcept |
Reset iterator to first element.
Definition at line 561 of file tpl_skipList.H.
References Aleph::SkipList< Key, Type >::headerPtr.
|
private |
Definition at line 490 of file tpl_skipList.H.
|
private |
Definition at line 489 of file tpl_skipList.H.