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, typename std::add_const< typename hashT::datumT >::type, typename hashT::datumT >::type datumT
 
typedef std::ptrdiff_t difference_type
 
typedef std::conditional< std::is_const< hashT >::value, typename std::add_const< typename hashT::entryT >::type, typename hashT::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. More...
 
 HashIterator (const HashIterator &other)
 Copy constructor. More...
 
template<class otherHashT >
 HashIterator (const HashIterator< otherHashT > &other)
 Implicit conversion of another hash type to this hash type. More...
 
 HashIterator (hashT *h, bool begin)
 Makes begin/end iterator. More...
 
 HashIterator (hashT *h, int bin, entryT *entry)
 Makes iterator to specific entry. More...
 
void advance (int n)
 Only positive increments are supported. More...
 
int distance (const HashIterator &other) const
 Difference between iterators only supported for this=start and other=end. More...
 
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. More...
 

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, typename std::add_const<typename hashT::datumT>::type, typename hashT::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, typename std::add_const<typename hashT::entryT>::type, typename hashT::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

References a.

◆ 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

References a.

Friends And Related Function 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: