ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::ChainedHashTable< K, V, C, H >::const_iterator Class Reference

the iterator on the pairs, list by list More...

#include <ADS/dictionary/ChainedHashTable.h>

Public types

using iterator_category = std::forward_iterator_tag
 the category of the iterator
using value_type = Pair
 the type of the items, for the standard library
using difference_type = std::ptrdiff_t
 the type of the distances between two iterators
using reference = const Pair &
 a reference to an item
using pointer = const Pair *
 a pointer to an item

Public member functions

 const_iterator (void)=default
 the end of no table
 const_iterator (const Lists *T, std::size_t b)
 on the first pair from the list \( b \), or at the end
reference operator* (void) const
 the pair
pointer operator-> (void) const
 the address of the pair
const_iterator & operator++ (void)
 to the next pair, on the next list that is not empty after the last pair of a list
const_iterator operator++ (int)
 to the next pair, returning the iterator before the step
bool operator== (const const_iterator &o) const
 equal on the same pair, or both at the end

Detailed description

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
class ADS::ChainedHashTable< K, V, C, H >::const_iterator

the iterator on the pairs, list by list

Member typedef documentation

◆ difference_type

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
using ADS::ChainedHashTable< K, V, C, H >::const_iterator::difference_type = std::ptrdiff_t

the type of the distances between two iterators

◆ iterator_category

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
using ADS::ChainedHashTable< K, V, C, H >::const_iterator::iterator_category = std::forward_iterator_tag

the category of the iterator

◆ pointer

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
using ADS::ChainedHashTable< K, V, C, H >::const_iterator::pointer = const Pair *

a pointer to an item

◆ reference

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
using ADS::ChainedHashTable< K, V, C, H >::const_iterator::reference = const Pair &

a reference to an item

◆ value_type

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
using ADS::ChainedHashTable< K, V, C, H >::const_iterator::value_type = Pair

the type of the items, for the standard library

Constructor and destructor documentation

◆ const_iterator() [1/2]

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
ADS::ChainedHashTable< K, V, C, H >::const_iterator::const_iterator ( void )
default

the end of no table

◆ const_iterator() [2/2]

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
ADS::ChainedHashTable< K, V, C, H >::const_iterator::const_iterator ( const Lists * T,
std::size_t b )
inline

on the first pair from the list \( b \), or at the end

Member function documentation

◆ operator*()

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
reference ADS::ChainedHashTable< K, V, C, H >::const_iterator::operator* ( void ) const
inline

the pair

◆ operator++() [1/2]

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
const_iterator ADS::ChainedHashTable< K, V, C, H >::const_iterator::operator++ ( int )
inline

to the next pair, returning the iterator before the step

◆ operator++() [2/2]

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
const_iterator & ADS::ChainedHashTable< K, V, C, H >::const_iterator::operator++ ( void )
inline

to the next pair, on the next list that is not empty after the last pair of a list

◆ operator->()

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
pointer ADS::ChainedHashTable< K, V, C, H >::const_iterator::operator-> ( void ) const
inline

the address of the pair

◆ operator==()

template<class K, class V, Chain C = Chain::FRONT, class H = std::hash< K >>
bool ADS::ChainedHashTable< K, V, C, H >::const_iterator::operator== ( const const_iterator & o) const
inline

equal on the same pair, or both at the end


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