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

Iterator for distributed container wraps the local iterator. More...

#include <worlddc.h>

Public Types

typedef std::iterator_traits< internal_iteratorT >::difference_type difference_type
 
typedef std::iterator_traits< internal_iteratorT >::iterator_category iterator_category
 
typedef std::iterator_traits< internal_iteratorT >::pointer pointer
 
typedef std::iterator_traits< internal_iteratorT >::reference reference
 
typedef std::iterator_traits< internal_iteratorT >::value_type value_type
 

Public Member Functions

 WorldContainerIterator ()
 Default constructor makes a local uninitialized value.
 
 WorldContainerIterator (const internal_iteratorT &it)
 Initializes from a local iterator.
 
 WorldContainerIterator (const value_type &v)
 Initializes to cache a remote value.
 
 WorldContainerIterator (const WorldContainerIterator &other)
 
template<class iteratorT >
 WorldContainerIterator (const WorldContainerIterator< iteratorT > &other)
 
 ~WorldContainerIterator ()
 
const internal_iteratorT & get_internal_iterator () const
 Private: (or should be) Returns iterator of internal container.
 
bool is_cached () const
 Returns true if this is non-local or cached value.
 
bool operator!= (const WorldContainerIterator &other) const
 Determines if two iterators are different.
 
reference operator* () const
 Iterators dereference to std::pair<const keyT,valueT>
 
WorldContainerIteratoroperator++ ()
 Pre-increment of an iterator (i.e., ++it) — local iterators only.
 
WorldContainerIterator operator++ (int)
 
pointer operator-> () const
 Iterators dereference to std::pair<const keyT,valueT>
 
WorldContainerIteratoroperator= (const WorldContainerIterator &other)
 Assignment.
 
bool operator== (const WorldContainerIterator &other) const
 Determines if two iterators are identical.
 
template<typename Archive >
void serialize (const Archive &)
 

Private Member Functions

template<class iteratorT >
void copy (const WorldContainerIterator< iteratorT > &other)
 

Private Attributes

internal_iteratorT it
 Iterator from local container.
 
value_typevalue
 holds the remote values
 

Friends

template<class iteratorT >
class WorldContainerIterator
 

Detailed Description

template<class internal_iteratorT>
class madness::WorldContainerIterator< internal_iteratorT >

Iterator for distributed container wraps the local iterator.

Member Typedef Documentation

◆ difference_type

template<class internal_iteratorT >
typedef std::iterator_traits<internal_iteratorT>::difference_type madness::WorldContainerIterator< internal_iteratorT >::difference_type

◆ iterator_category

template<class internal_iteratorT >
typedef std::iterator_traits<internal_iteratorT>::iterator_category madness::WorldContainerIterator< internal_iteratorT >::iterator_category

◆ pointer

template<class internal_iteratorT >
typedef std::iterator_traits<internal_iteratorT>::pointer madness::WorldContainerIterator< internal_iteratorT >::pointer

◆ reference

template<class internal_iteratorT >
typedef std::iterator_traits<internal_iteratorT>::reference madness::WorldContainerIterator< internal_iteratorT >::reference

◆ value_type

template<class internal_iteratorT >
typedef std::iterator_traits<internal_iteratorT>::value_type madness::WorldContainerIterator< internal_iteratorT >::value_type

Constructor & Destructor Documentation

◆ WorldContainerIterator() [1/5]

template<class internal_iteratorT >
madness::WorldContainerIterator< internal_iteratorT >::WorldContainerIterator ( )
inlineexplicit

Default constructor makes a local uninitialized value.

◆ WorldContainerIterator() [2/5]

template<class internal_iteratorT >
madness::WorldContainerIterator< internal_iteratorT >::WorldContainerIterator ( const internal_iteratorT &  it)
inlineexplicit

Initializes from a local iterator.

◆ WorldContainerIterator() [3/5]

template<class internal_iteratorT >
madness::WorldContainerIterator< internal_iteratorT >::WorldContainerIterator ( const value_type v)
inlineexplicit

Initializes to cache a remote value.

References v, and madness::WorldContainerIterator< internal_iteratorT >::value.

◆ WorldContainerIterator() [4/5]

template<class internal_iteratorT >
madness::WorldContainerIterator< internal_iteratorT >::WorldContainerIterator ( const WorldContainerIterator< internal_iteratorT > &  other)
inline

◆ WorldContainerIterator() [5/5]

template<class internal_iteratorT >
template<class iteratorT >
madness::WorldContainerIterator< internal_iteratorT >::WorldContainerIterator ( const WorldContainerIterator< iteratorT > &  other)
inline

◆ ~WorldContainerIterator()

template<class internal_iteratorT >
madness::WorldContainerIterator< internal_iteratorT >::~WorldContainerIterator ( )
inline

Member Function Documentation

◆ copy()

template<class internal_iteratorT >
template<class iteratorT >
void madness::WorldContainerIterator< internal_iteratorT >::copy ( const WorldContainerIterator< iteratorT > &  other)
inlineprivate

◆ get_internal_iterator()

template<class internal_iteratorT >
const internal_iteratorT & madness::WorldContainerIterator< internal_iteratorT >::get_internal_iterator ( ) const
inline

Private: (or should be) Returns iterator of internal container.

References madness::WorldContainerIterator< internal_iteratorT >::it.

◆ is_cached()

template<class internal_iteratorT >
bool madness::WorldContainerIterator< internal_iteratorT >::is_cached ( ) const
inline

◆ operator!=()

template<class internal_iteratorT >
bool madness::WorldContainerIterator< internal_iteratorT >::operator!= ( const WorldContainerIterator< internal_iteratorT > &  other) const
inline

Determines if two iterators are different.

◆ operator*()

template<class internal_iteratorT >
reference madness::WorldContainerIterator< internal_iteratorT >::operator* ( ) const
inline

◆ operator++() [1/2]

template<class internal_iteratorT >
WorldContainerIterator & madness::WorldContainerIterator< internal_iteratorT >::operator++ ( )
inline

Pre-increment of an iterator (i.e., ++it) — local iterators only.

Trying to increment a remote iterator will throw

References madness::WorldContainerIterator< internal_iteratorT >::is_cached(), madness::WorldContainerIterator< internal_iteratorT >::it, and MADNESS_ASSERT.

◆ operator++() [2/2]

template<class internal_iteratorT >
WorldContainerIterator madness::WorldContainerIterator< internal_iteratorT >::operator++ ( int  )
inline

◆ operator->()

template<class internal_iteratorT >
pointer madness::WorldContainerIterator< internal_iteratorT >::operator-> ( ) const
inline

◆ operator=()

template<class internal_iteratorT >
WorldContainerIterator & madness::WorldContainerIterator< internal_iteratorT >::operator= ( const WorldContainerIterator< internal_iteratorT > &  other)
inline

◆ operator==()

template<class internal_iteratorT >
bool madness::WorldContainerIterator< internal_iteratorT >::operator== ( const WorldContainerIterator< internal_iteratorT > &  other) const
inline

◆ serialize()

template<class internal_iteratorT >
template<typename Archive >
void madness::WorldContainerIterator< internal_iteratorT >::serialize ( const Archive &  )
inline

References MADNESS_EXCEPTION.

Friends And Related Symbol Documentation

◆ WorldContainerIterator

template<class internal_iteratorT >
template<class iteratorT >
friend class WorldContainerIterator
friend

Member Data Documentation

◆ it

template<class internal_iteratorT >
internal_iteratorT madness::WorldContainerIterator< internal_iteratorT >::it
private

◆ value

template<class internal_iteratorT >
value_type* madness::WorldContainerIterator< internal_iteratorT >::value
mutableprivate

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