MADNESS 0.10.1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
madness::Hash_private::HashIterator< hashT > Class Template Reference

iterator for hash More...

#include <worldhashmap.h>

Public Types

typedef std::conditional< std::is_const< hashT >::value, typenamestd::add_const< typenamehashT::datumT >::type, typenamehashT::datumT >::type datumT
 
typedef std::ptrdiff_t difference_type
 
typedef std::conditional< std::is_const< hashT >::value, typenamestd::add_const< typenamehashT::entryT >::type, typenamehashT::entryT >::type entryT
 
typedef std::forward_iterator_tag iterator_category
 
typedef datumTpointer
 
typedef datumTreference
 
typedef datumT value_type
 

Public Member Functions

 HashIterator ()
 Makes invalid iterator.
 
 HashIterator (const HashIterator &other)
 Copy constructor.
 
template<class otherHashT >
 HashIterator (const HashIterator< otherHashT > &other)
 Implicit conversion of another hash type to this hash type.
 
 HashIterator (hashT *h, bool begin)
 Makes begin/end iterator.
 
 HashIterator (hashT *h, int bin, entryT *entry)
 Makes iterator to specific entry.
 
void advance (int n)
 Only positive increments are supported.
 
int distance (const HashIterator &other) const
 Difference between iterators only supported for this=start and other=end.
 
bool operator!= (const HashIterator &a) const
 
reference operator* () const
 
HashIteratoroperator++ ()
 
HashIterator operator++ (int)
 
pointer operator-> () const
 
bool operator== (const HashIterator &a) const
 

Private Member Functions

void next_non_null_entry ()
 If the entry is null (end of current bin) finds next non-empty bin.
 

Private Attributes

int bin
 
entryTentry
 
hashTh
 

Friends

template<class otherHashT >
class HashIterator
 

Detailed Description

template<class hashT>
class madness::Hash_private::HashIterator< hashT >

iterator for hash

Member Typedef Documentation

◆ datumT

template<class hashT >
typedef std::conditional<std::is_const<hashT>::value,typenamestd::add_const<typenamehashT::datumT>::type,typenamehashT::datumT>::type madness::Hash_private::HashIterator< hashT >::datumT

◆ difference_type

template<class hashT >
typedef std::ptrdiff_t madness::Hash_private::HashIterator< hashT >::difference_type

◆ entryT

template<class hashT >
typedef std::conditional<std::is_const<hashT>::value,typenamestd::add_const<typenamehashT::entryT>::type,typenamehashT::entryT>::type madness::Hash_private::HashIterator< hashT >::entryT

◆ iterator_category

template<class hashT >
typedef std::forward_iterator_tag madness::Hash_private::HashIterator< hashT >::iterator_category

◆ pointer

template<class hashT >
typedef datumT* madness::Hash_private::HashIterator< hashT >::pointer

◆ reference

template<class hashT >
typedef datumT& madness::Hash_private::HashIterator< hashT >::reference

◆ value_type

template<class hashT >
typedef datumT madness::Hash_private::HashIterator< hashT >::value_type

Constructor & Destructor Documentation

◆ HashIterator() [1/5]

template<class hashT >
madness::Hash_private::HashIterator< hashT >::HashIterator ( )
inline

Makes invalid iterator.

◆ HashIterator() [2/5]

template<class hashT >
madness::Hash_private::HashIterator< hashT >::HashIterator ( hashT h,
bool  begin 
)
inline

◆ HashIterator() [3/5]

template<class hashT >
madness::Hash_private::HashIterator< hashT >::HashIterator ( hashT h,
int  bin,
entryT entry 
)
inline

Makes iterator to specific entry.

◆ HashIterator() [4/5]

template<class hashT >
madness::Hash_private::HashIterator< hashT >::HashIterator ( const HashIterator< hashT > &  other)
inline

Copy constructor.

◆ HashIterator() [5/5]

template<class hashT >
template<class otherHashT >
madness::Hash_private::HashIterator< hashT >::HashIterator ( const HashIterator< otherHashT > &  other)
inline

Implicit conversion of another hash type to this hash type.

This allows implicit conversion from hash types to const hash types.

Member Function Documentation

◆ advance()

template<class hashT >
void madness::Hash_private::HashIterator< hashT >::advance ( int  n)
inline

◆ distance()

template<class hashT >
int madness::Hash_private::HashIterator< hashT >::distance ( const HashIterator< hashT > &  other) const
inline

Difference between iterators only supported for this=start and other=end.

This exists to support construction of range for parallel iteration over the entire container.

References madness::Hash_private::HashIterator< hashT >::h, and MADNESS_ASSERT.

Referenced by std::distance().

◆ next_non_null_entry()

template<class hashT >
void madness::Hash_private::HashIterator< hashT >::next_non_null_entry ( )
inlineprivate

◆ operator!=()

template<class hashT >
bool madness::Hash_private::HashIterator< hashT >::operator!= ( const HashIterator< hashT > &  a) const
inline

◆ operator*()

template<class hashT >
reference madness::Hash_private::HashIterator< hashT >::operator* ( ) const
inline

◆ operator++() [1/2]

template<class hashT >
HashIterator & madness::Hash_private::HashIterator< hashT >::operator++ ( )
inline

◆ operator++() [2/2]

template<class hashT >
HashIterator madness::Hash_private::HashIterator< hashT >::operator++ ( int  )
inline

◆ operator->()

template<class hashT >
pointer madness::Hash_private::HashIterator< hashT >::operator-> ( ) const
inline

◆ operator==()

template<class hashT >
bool madness::Hash_private::HashIterator< hashT >::operator== ( const HashIterator< hashT > &  a) const
inline

Friends And Related Symbol Documentation

◆ HashIterator

template<class hashT >
template<class otherHashT >
friend class HashIterator
friend

Member Data Documentation

◆ bin

template<class hashT >
int madness::Hash_private::HashIterator< hashT >::bin
private

◆ entry

template<class hashT >
entryT* madness::Hash_private::HashIterator< hashT >::entry
private

◆ h

template<class hashT >
hashT* madness::Hash_private::HashIterator< hashT >::h
private

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