|
ORIGINAL
|
Forward iterator for hashTable. More...
#include <hashTable.h>


Public Member Functions | |
| bool | hasNext () const |
| Checks if more elements are available. | |
| void | next () const |
| Advances to the next element. | |
| void | operator+= (integer steps) const |
| Advances iterator by steps positions. | |
| couple< const K_TYPE, V_TYPE > & | get () |
| Gets current key-value pair (non-const) | |
| couple< const K_TYPE, V_TYPE > | get () const |
| Gets current key-value pair (const) | |
| bool | isValid () const |
| Checks if iterator points to valid element. | |
Protected Member Functions | |
| Iterator (vector< hashNode *, rebind_alloc_pointer > *buckets=nullptr, u_integer bucket=0, hashNode *node=nullptr) | |
| Constructs an iterator pointing to specific position. | |
| Iterator (const Iterator &other) | |
| Copy constructor. | |
| Iterator & | operator= (const Iterator &other) |
| Copy assignment operator. | |
Static Protected Member Functions | |
| static u_integer | findNextValidBucket (vector< hashNode *, rebind_alloc_pointer > *buckets, u_integer bucket) |
| Finds the next non-empty bucket. | |
| static u_integer | findPrevValidBucket (vector< hashNode *, rebind_alloc_pointer > *buckets, u_integer bucket) |
| Finds the previous non-empty bucket. | |
Protected Attributes | |
| vector< hashNode *, rebind_alloc_pointer > * | p_buckets |
| u_integer | cur_bucket |
| hashNode * | p_node |
Forward iterator for hashTable.
Provides forward iteration over hashTable elements with:
Iterator Characteristics:
|
explicitprotected |
Constructs an iterator pointing to specific position.
| buckets | Pointer to buckets vector |
| bucket | Current bucket index |
| node | Current node pointer |
|
protected |
Copy constructor.
| other | Iterator to copy |
|
staticprotected |
Finds the next non-empty bucket.
| buckets | Reference to buckets vector |
| bucket | Starting bucket index |
|
staticprotected |
Finds the previous non-empty bucket.
| buckets | Reference to buckets vector |
| bucket | Starting bucket index |
| original::couple< const K_TYPE, V_TYPE > & original::hashTable< K_TYPE, V_TYPE, ALLOC, HASH >::Iterator::get | ( | ) |
Gets current key-value pair (non-const)
| outOfBoundError | if iterator is invalid |
| original::couple< const K_TYPE, V_TYPE > original::hashTable< K_TYPE, V_TYPE, ALLOC, HASH >::Iterator::get | ( | ) | const |
Gets current key-value pair (const)
| outOfBoundError | if iterator is invalid |
Checks if more elements are available.
Checks if iterator points to valid element.
Advances to the next element.
| outOfBoundError | if already at end |
| void original::hashTable< K_TYPE, V_TYPE, ALLOC, HASH >::Iterator::operator+= | ( | integer | steps | ) | const |
Advances iterator by steps positions.
| steps | Number of positions to advance (must be >= 0) |
| unSupportedMethodError | if steps is negative |
|
protected |