AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::detail::KVPairIterator< KeyType, ValueType > Class Template Reference

Implements a zip-iterator concept for a key-value pair. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/FlatMapUtil.hpp>

Inheritance diagram for axom::detail::KVPairIterator< KeyType, ValueType >:

Public Types

using difference_type = IndexType
 
using value_type = std::pair< const KeyType, ValueType >
 
using reference = ValueType &
 
using pointer = ValueType *
 
using iterator_category = std::random_access_iterator_tag
 
Equality and relational operators
using iterator = IteratorBase< KVPairIterator< KeyType, ValueType >, IndexType >
 

Public Member Functions

 KVPairIterator ()=default
 
AXOM_HOST_DEVICE KVPairIterator (KeyIterator keyIter, ValueIterator valueIter)
 
AXOM_HOST_DEVICE value_type operator* () const
 Returns the current iterator value. More...
 
Iterator advance and distance operators
AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE KVPairIterator< KeyType, ValueType > & operator++ ()
 Pre-increment operator. More...
 
KVPairIterator< KeyType, ValueType > operator++ (int)
 Post-increment operator. More...
 
KVPairIterator< KeyType, ValueType > & operator-- ()
 Pre-decrement operator. More...
 
KVPairIterator< KeyType, ValueType > operator-- (int)
 Post-decrement operator. More...
 
AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE KVPairIterator< KeyType, ValueType > & operator+= (IndexType n)
 Addition-assignment operator. More...
 
KVPairIterator< KeyType, ValueType > & operator-= (IndexType n)
 Subtraction-assignment operator. More...
 

Protected Member Functions

AXOM_HOST_DEVICE void advance (IndexType n)
 

Protected Attributes

IndexType m_pos
 

Detailed Description

template<typename KeyType, typename ValueType>
class axom::detail::KVPairIterator< KeyType, ValueType >

Implements a zip-iterator concept for a key-value pair.

Member Typedef Documentation

◆ difference_type

template<typename KeyType , typename ValueType >
using axom::detail::KVPairIterator< KeyType, ValueType >::difference_type = IndexType

◆ value_type

template<typename KeyType , typename ValueType >
using axom::detail::KVPairIterator< KeyType, ValueType >::value_type = std::pair<const KeyType, ValueType>

◆ reference

template<typename KeyType , typename ValueType >
using axom::detail::KVPairIterator< KeyType, ValueType >::reference = ValueType&

◆ pointer

template<typename KeyType , typename ValueType >
using axom::detail::KVPairIterator< KeyType, ValueType >::pointer = ValueType*

◆ iterator_category

template<typename KeyType , typename ValueType >
using axom::detail::KVPairIterator< KeyType, ValueType >::iterator_category = std::random_access_iterator_tag

◆ iterator

using axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::iterator = IteratorBase<KVPairIterator< KeyType, ValueType > , IndexType >
inherited

Constructor & Destructor Documentation

◆ KVPairIterator() [1/2]

template<typename KeyType , typename ValueType >
axom::detail::KVPairIterator< KeyType, ValueType >::KVPairIterator ( )
default

◆ KVPairIterator() [2/2]

template<typename KeyType , typename ValueType >
AXOM_HOST_DEVICE axom::detail::KVPairIterator< KeyType, ValueType >::KVPairIterator ( KeyIterator  keyIter,
ValueIterator  valueIter 
)
inline

Member Function Documentation

◆ operator*()

template<typename KeyType , typename ValueType >
AXOM_HOST_DEVICE value_type axom::detail::KVPairIterator< KeyType, ValueType >::operator* ( ) const
inline

Returns the current iterator value.

◆ advance()

template<typename KeyType , typename ValueType >
AXOM_HOST_DEVICE void axom::detail::KVPairIterator< KeyType, ValueType >::advance ( IndexType  n)
inlineprotected

◆ operator++() [1/2]

AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE KVPairIterator< KeyType, ValueType > & axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::operator++ ( )
inlineinherited

Pre-increment operator.

◆ operator++() [2/2]

KVPairIterator< KeyType, ValueType > axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::operator++ ( int  )
inlineinherited

Post-increment operator.

◆ operator--() [1/2]

KVPairIterator< KeyType, ValueType > & axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::operator-- ( )
inlineinherited

Pre-decrement operator.

◆ operator--() [2/2]

KVPairIterator< KeyType, ValueType > axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::operator-- ( int  )
inlineinherited

Post-decrement operator.

◆ operator+=()

AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE KVPairIterator< KeyType, ValueType > & axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::operator+= ( IndexType  n)
inlineinherited

Addition-assignment operator.

◆ operator-=()

KVPairIterator< KeyType, ValueType > & axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::operator-= ( IndexType  n)
inlineinherited

Subtraction-assignment operator.

Member Data Documentation

◆ m_pos

IndexType axom::IteratorBase< KVPairIterator< KeyType, ValueType > , IndexType >::m_pos
protectedinherited

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