Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator Class Reference

Iterator over a GenLhashTable hash table. More...

#include <tpl_lhash.H>

Collaboration diagram for Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator:
[legend]

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.
 
Bucketget_curr_ne () noexcept
 
Bucketget_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 ()
 
Bucketdel ()
 

Private Member Functions

void locate_next_available_entry_ne () noexcept
 
void locate_next_available_entry ()
 
void locate_next_available_bucket_ne () noexcept
 
void locate_next_available_bucket ()
 
void locate_prev_available_entry_ne () noexcept
 
void locate_prev_available_entry ()
 
void locate_prev_available_bucket_ne () noexcept
 
void locate_prev_available_bucket ()
 

Private Attributes

long curr_index = -1
 
long curr_pos = 0
 
BucketItor curr_itor
 
GenLhashTablehash_table = nullptr
 

Detailed Description

template<typename Key, class BucketType, class Cmp>
class Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator

Iterator over a GenLhashTable hash table.

Note
The observation sequence produced by the iterator is not ordered.

Definition at line 523 of file tpl_lhash.H.

Member Typedef Documentation

◆ Item_Type

template<typename Key , class BucketType , class Cmp >
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.

◆ Set_Type

template<typename Key , class BucketType , class Cmp >
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.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<typename Key , class BucketType , class Cmp >
Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Iterator ( const GenLhashTable table)
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().

◆ Iterator() [2/2]

template<typename Key , class BucketType , class Cmp >
Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Iterator ( )
default

Instantiate an empty iterator.

Member Function Documentation

◆ del()

◆ end()

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::end ( )
inlinenoexcept

Definition at line 700 of file tpl_lhash.H.

References put_itor_at_the_end().

◆ get_curr()

◆ get_curr_ne()

template<typename Key , class BucketType , class Cmp >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr_ne ( )
inlinenoexcept

◆ get_pos()

template<typename Key , class BucketType , class Cmp >
long Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_pos ( ) const
inlinenoexcept

◆ has_curr()

◆ locate_next_available_bucket()

◆ locate_next_available_bucket_ne()

◆ locate_next_available_entry()

◆ locate_next_available_entry_ne()

◆ locate_prev_available_bucket()

◆ locate_prev_available_bucket_ne()

◆ locate_prev_available_entry()

◆ locate_prev_available_entry_ne()

◆ next()

◆ next_ne()

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next_ne ( )
inlinenoexcept

◆ prev()

◆ prev_ne()

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev_ne ( )
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().

◆ reset_first()

◆ reset_last()

Member Data Documentation

◆ curr_index

◆ curr_itor

◆ curr_pos

◆ hash_table


The documentation for this class was generated from the following file: