Huffman Zipper  v-1.0
Data Compression and Decompression using Greedy Huffman Algorithm
HashMap< KeyType, ValueType >::iterator Class Reference

Iterator support for class HashMap. More...

#include <HashMap.h>

Public Types

using difference_type = Entry
 
using value_type = Entry
 
using pointer = const Entry *
 
using reference = const Entry &
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 iterator ()
 
 iterator (const HashMap *map, bool end)
 
 iterator (const iterator &it)
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
bool operator== (const iterator &rhs)
 
bool operator!= (const iterator &rhs)
 
Entry operator* ()
 
Entryoperator-> ()
 

Private Attributes

const HashMapmap
 Pointer to the map
More...
 
int bucket
 Index of current bucket
More...
 
Entrycurrent
 Current cell in bucket chain. More...
 

Detailed Description

template<typename KeyType, typename ValueType>
class HashMap< KeyType, ValueType >::iterator

Iterator support for class HashMap.

Definition at line 114 of file HashMap.h.

Member Typedef Documentation

◆ difference_type

template<typename KeyType , typename ValueType >
using HashMap< KeyType, ValueType >::iterator::difference_type = Entry

Definition at line 175 of file HashMap.h.

◆ iterator_category

template<typename KeyType , typename ValueType >
using HashMap< KeyType, ValueType >::iterator::iterator_category = std::forward_iterator_tag

Definition at line 179 of file HashMap.h.

◆ pointer

template<typename KeyType , typename ValueType >
using HashMap< KeyType, ValueType >::iterator::pointer = const Entry*

Definition at line 177 of file HashMap.h.

◆ reference

template<typename KeyType , typename ValueType >
using HashMap< KeyType, ValueType >::iterator::reference = const Entry&

Definition at line 178 of file HashMap.h.

◆ value_type

template<typename KeyType , typename ValueType >
using HashMap< KeyType, ValueType >::iterator::value_type = Entry

Definition at line 176 of file HashMap.h.

Constructor & Destructor Documentation

◆ iterator() [1/3]

template<typename KeyType , typename ValueType >
HashMap< KeyType, ValueType >::iterator::iterator ( )
inline

Definition at line 121 of file HashMap.h.

◆ iterator() [2/3]

template<typename KeyType , typename ValueType >
HashMap< KeyType, ValueType >::iterator::iterator ( const HashMap map,
bool  end 
)
inline

Definition at line 123 of file HashMap.h.

◆ iterator() [3/3]

template<typename KeyType , typename ValueType >
HashMap< KeyType, ValueType >::iterator::iterator ( const iterator it)
inline

Definition at line 138 of file HashMap.h.

Member Function Documentation

◆ operator!=()

template<typename KeyType , typename ValueType >
bool HashMap< KeyType, ValueType >::iterator::operator!= ( const iterator rhs)
inline

Definition at line 162 of file HashMap.h.

◆ operator*()

template<typename KeyType , typename ValueType >
Entry HashMap< KeyType, ValueType >::iterator::operator* ( )
inline

Definition at line 166 of file HashMap.h.

◆ operator++() [1/2]

template<typename KeyType , typename ValueType >
iterator& HashMap< KeyType, ValueType >::iterator::operator++ ( )
inline

Definition at line 144 of file HashMap.h.

◆ operator++() [2/2]

template<typename KeyType , typename ValueType >
iterator HashMap< KeyType, ValueType >::iterator::operator++ ( int  )
inline

Definition at line 152 of file HashMap.h.

◆ operator->()

template<typename KeyType , typename ValueType >
Entry* HashMap< KeyType, ValueType >::iterator::operator-> ( )
inline

Definition at line 170 of file HashMap.h.

◆ operator==()

template<typename KeyType , typename ValueType >
bool HashMap< KeyType, ValueType >::iterator::operator== ( const iterator rhs)
inline

Definition at line 158 of file HashMap.h.

Member Data Documentation

◆ bucket

template<typename KeyType , typename ValueType >
int HashMap< KeyType, ValueType >::iterator::bucket
private

Index of current bucket

Definition at line 117 of file HashMap.h.

◆ current

template<typename KeyType , typename ValueType >
Entry* HashMap< KeyType, ValueType >::iterator::current
private

Current cell in bucket chain.

Definition at line 118 of file HashMap.h.

◆ map

template<typename KeyType , typename ValueType >
const HashMap* HashMap< KeyType, ValueType >::iterator::map
private

Pointer to the map

Definition at line 116 of file HashMap.h.