AlgoPlus v0.1.0
Loading...
Searching...
No Matches
hash_table< KeyType, ValueType >::Iterator Class Reference

Iterator class. More...

#include <hash_table.h>

Public Member Functions

 Iterator (BucketIterator start, BucketIterator end)
 Construct a new Iterator object.
 
Iteratoroperator= (const std::unordered_map< size_t, std::list< std::pair< KeyType, ValueType > > > &bucket)
 operator = for hash table iterator class
 
Iteratoroperator++ ()
 operator ++ for type Iterator
 
Iterator operator++ (int)
 operator ++ for type Iterator
 
Iteratoroperator-- ()
 operator – for type Iterator
 
Iterator operator-- (int)
 operator – for type Iterator
 
bool operator!= (const Iterator &it) const
 operator != for Type Iterator
 
std::pair< KeyType, ValueType > & operator* ()
 operator * for Type Iterator
 

Detailed Description

template<typename KeyType, typename ValueType>
class hash_table< KeyType, ValueType >::Iterator

Iterator class.

Constructor & Destructor Documentation

◆ Iterator()

template<typename KeyType , typename ValueType >
hash_table< KeyType, ValueType >::Iterator::Iterator ( BucketIterator start,
BucketIterator end )
inlineexplicit

Construct a new Iterator object.

Parameters
bucketthe bucket list

Member Function Documentation

◆ operator!=()

template<typename KeyType , typename ValueType >
bool hash_table< KeyType, ValueType >::Iterator::operator!= ( const Iterator & it) const
inline

operator != for Type Iterator

Parameters
itthe iterator we want to make the check
Returns
true if the current list that exist in the index is not equal to the it.list that exist in the it.index
false otherwise

◆ operator*()

template<typename KeyType , typename ValueType >
std::pair< KeyType, ValueType > & hash_table< KeyType, ValueType >::Iterator::operator* ( )
inline

operator * for Type Iterator

Returns
std::list<std::pair<KeyType, ValueType>> the list of the current index

◆ operator++() [1/2]

template<typename KeyType , typename ValueType >
Iterator & hash_table< KeyType, ValueType >::Iterator::operator++ ( )
inline

operator ++ for type Iterator

Returns
Iterator&

◆ operator++() [2/2]

template<typename KeyType , typename ValueType >
Iterator hash_table< KeyType, ValueType >::Iterator::operator++ ( int )
inline

operator ++ for type Iterator

Returns
Iterator&

◆ operator--() [1/2]

template<typename KeyType , typename ValueType >
Iterator & hash_table< KeyType, ValueType >::Iterator::operator-- ( )
inline

operator – for type Iterator

Returns
Iterator&

◆ operator--() [2/2]

template<typename KeyType , typename ValueType >
Iterator hash_table< KeyType, ValueType >::Iterator::operator-- ( int )
inline

operator – for type Iterator

Returns
Iterator

◆ operator=()

template<typename KeyType , typename ValueType >
Iterator & hash_table< KeyType, ValueType >::Iterator::operator= ( const std::unordered_map< size_t, std::list< std::pair< KeyType, ValueType > > > & bucket)
inline

operator = for hash table iterator class

Parameters
bucketthe bucket list
Returns
Iterator&

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