|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Iterator over a GenLhashTable hash table. More...
#include <tpl_lhash.H>
Public Types | |
| using | Set_Type = GenLhashTable |
| Set type over which iteration occurs. | |
| using | Item_Type = Bucket * |
| Item type returned by get_curr(). | |
Public Member Functions | |
| Iterator (const GenLhashTable &table) noexcept | |
| Instantiate an iterator over the hash table. | |
| Iterator ()=default | |
| Instantiate an empty iterator. | |
| void | reset_first () noexcept |
| Reset the iterator to the first bucket. | |
| void | reset_last () noexcept |
| Reset the iterator to the last bucket. | |
| void | end () noexcept |
| bool | has_curr () const noexcept |
| Returns true if the iterator has a current bucket. | |
| Bucket * | get_curr_ne () noexcept |
| Bucket * | get_curr () |
| Returns the current bucket. | |
| long | get_pos () const noexcept |
| void | next_ne () noexcept |
| Advances the iterator by one bucket. | |
| void | next () |
| void | prev_ne () noexcept |
| Moves the iterator back by one bucket. | |
| void | prev () |
| Bucket * | del () |
Private Attributes | |
| long | curr_index = -1 |
| long | curr_pos = 0 |
| BucketItor | curr_itor |
| GenLhashTable * | hash_table = nullptr |
Iterator over a GenLhashTable hash table.
Definition at line 523 of file tpl_lhash.H.
| using Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Item_Type = Bucket * |
Item type returned by get_curr().
Definition at line 660 of file tpl_lhash.H.
| using Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Set_Type = GenLhashTable |
Set type over which iteration occurs.
Definition at line 657 of file tpl_lhash.H.
|
inlinenoexcept |
Instantiate an iterator over the hash table.
Definition at line 663 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry().
|
default |
Instantiate an empty iterator.
|
inline |
Definition at line 756 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::maps(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_bucket().
|
inlinenoexcept |
Definition at line 700 of file tpl_lhash.H.
References put_itor_at_the_end().
|
inline |
Returns the current bucket.
Definition at line 717 of file tpl_lhash.H.
References ah_overflow_error_if, ah_underflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, and Aleph::GenLhashTable< Key, BucketType, Cmp >::len.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::del().
|
inlinenoexcept |
Definition at line 711 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor.
|
inlinenoexcept |
Definition at line 728 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos.
|
inlinenoexcept |
Returns true if the iterator has a current bucket.
Definition at line 706 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::maps().
Referenced by Aleph::DynLhashTable< Key, Record, Cmp >::copy().
|
inlineprivate |
|
inlineprivatenoexcept |
Definition at line 576 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), and Aleph::maps().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next_ne().
|
inlineprivate |
Definition at line 552 of file tpl_lhash.H.
References ah_overflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::maps(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Iterator(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_first().
|
inlineprivatenoexcept |
Definition at line 531 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::maps(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne().
|
inlineprivate |
Definition at line 647 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), and Aleph::maps().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev().
|
inlineprivatenoexcept |
Definition at line 639 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne(), and Aleph::maps().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev_ne().
|
inlineprivate |
Definition at line 614 of file tpl_lhash.H.
References ah_underflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), Aleph::maps(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().
|
inlineprivatenoexcept |
Definition at line 592 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), Aleph::maps(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne().
|
inline |
Definition at line 736 of file tpl_lhash.H.
References ah_overflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next_ne().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::del().
|
inlinenoexcept |
Advances the iterator by one bucket.
Definition at line 731 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next().
|
inline |
Definition at line 749 of file tpl_lhash.H.
References ah_underflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket().
|
inlinenoexcept |
Moves the iterator back by one bucket.
Definition at line 744 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne().
|
inlinenoexcept |
Reset the iterator to the first bucket.
Definition at line 679 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry().
|
inlinenoexcept |
Reset the iterator to the last bucket.
Definition at line 687 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::GenLhashTable< Key, BucketType, Cmp >::is_empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::N.
|
private |
Definition at line 525 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::has_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_first(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().
|
private |
Definition at line 527 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne().
|
private |
Definition at line 526 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_pos(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_first(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().
|
private |
Definition at line 528 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::del(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::has_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().