TiledArray::detail::UnaryTransformIterator< Iter, Op > Class Template Reference

Documentation

template<typename Iter, typename Op>
class TiledArray::detail::UnaryTransformIterator< Iter, Op >

Unary transform iterator.

This iterator holds an iterator that is transformed when dereferenced with a unary transform object that is provided by the user. The iterator dereferences to the result type of the transform operations.

Template Parameters
IterThe base iterator type of the transform iterator.
OpThe transform operator type.

Definition at line 252 of file transform_iterator.h.

Public Types

typedef ptrdiff_t difference_type
 Difference type. More...
 
typedef madness::detail::result_of< Op >::type value_type
 Iterator dereference value type. More...
 
typedef PointerProxy< value_typepointer
 Pointer type to iterator value. More...
 
typedef value_type reference
 Reference type to iterator value. More...
 
typedef std::input_iterator_tag iterator_category
 Iterator category type. More...
 
typedef UnaryTransformIterator< Iter, Op > this_type
 This object type. More...
 
typedef Iter base_iterator
 The base iterator type. More...
 

Public Member Functions

 UnaryTransformIterator (Iter it, Op op=Op())
 Constructor. More...
 
 UnaryTransformIterator (const this_type &other)
 Copy constructor. More...
 
template<typename It >
 UnaryTransformIterator (const UnaryTransformIterator< It, Op > &other)
 Copy conversion constructor. More...
 
this_typeoperator= (const this_type &other)
 Copy operator. More...
 
template<typename It >
this_typeoperator= (const UnaryTransformIterator< It, Op > &other)
 Copy conversion operator. More...
 
this_typeoperator++ ()
 Prefix increment operator. More...
 
this_type operator++ (int)
 Post-fix increment operator. More...
 
template<typename It >
bool operator== (const UnaryTransformIterator< It, Op > &other) const
 Equality operator. More...
 
template<typename It >
bool operator!= (const UnaryTransformIterator< It, Op > &other) const
 Inequality operator. More...
 
reference operator* () const
 Dereference operator. More...
 
pointer operator-> () const
 Arrow dereference operator. More...
 
base_iterator base () const
 Base iterator accessor. More...
 

Friends

template<typename , typename >
class UnaryTransformIterator
 

Member Typedef Documentation

◆ base_iterator

template<typename Iter , typename Op >
typedef Iter TiledArray::detail::UnaryTransformIterator< Iter, Op >::base_iterator

The base iterator type.

Definition at line 267 of file transform_iterator.h.

◆ difference_type

template<typename Iter , typename Op >
typedef ptrdiff_t TiledArray::detail::UnaryTransformIterator< Iter, Op >::difference_type

Difference type.

Definition at line 259 of file transform_iterator.h.

◆ iterator_category

template<typename Iter , typename Op >
typedef std::input_iterator_tag TiledArray::detail::UnaryTransformIterator< Iter, Op >::iterator_category

Iterator category type.

Definition at line 265 of file transform_iterator.h.

◆ pointer

template<typename Iter , typename Op >
typedef PointerProxy<value_type> TiledArray::detail::UnaryTransformIterator< Iter, Op >::pointer

Pointer type to iterator value.

Definition at line 262 of file transform_iterator.h.

◆ reference

template<typename Iter , typename Op >
typedef value_type TiledArray::detail::UnaryTransformIterator< Iter, Op >::reference

Reference type to iterator value.

Definition at line 263 of file transform_iterator.h.

◆ this_type

template<typename Iter , typename Op >
typedef UnaryTransformIterator<Iter, Op> TiledArray::detail::UnaryTransformIterator< Iter, Op >::this_type

This object type.

Definition at line 266 of file transform_iterator.h.

◆ value_type

template<typename Iter , typename Op >
typedef madness::detail::result_of<Op>::type TiledArray::detail::UnaryTransformIterator< Iter, Op >::value_type

Iterator dereference value type.

Definition at line 261 of file transform_iterator.h.

Constructor & Destructor Documentation

◆ UnaryTransformIterator() [1/3]

template<typename Iter , typename Op >
TiledArray::detail::UnaryTransformIterator< Iter, Op >::UnaryTransformIterator ( Iter  it,
Op  op = Op() 
)
inline

Constructor.

Parameters
itThe base iterator
opThe transform operator

Definition at line 273 of file transform_iterator.h.

◆ UnaryTransformIterator() [2/3]

template<typename Iter , typename Op >
TiledArray::detail::UnaryTransformIterator< Iter, Op >::UnaryTransformIterator ( const this_type other)
inline

Copy constructor.

Parameters
otherThe transform iterator to copy

Definition at line 278 of file transform_iterator.h.

◆ UnaryTransformIterator() [3/3]

template<typename Iter , typename Op >
template<typename It >
TiledArray::detail::UnaryTransformIterator< Iter, Op >::UnaryTransformIterator ( const UnaryTransformIterator< It, Op > &  other)
inline

Copy conversion constructor.

This constructor allows copying when the base iterators are implicitly convertible with each other.

Template Parameters
ItAn iterator type that is implicitly convertible to base_iterator type.
Parameters
otherThe transform iterator to copy
Note
The operation type must be the same for both transform iterators.

Definition at line 290 of file transform_iterator.h.

Member Function Documentation

◆ base()

template<typename Iter , typename Op >
base_iterator TiledArray::detail::UnaryTransformIterator< Iter, Op >::base ( ) const
inline

Base iterator accessor.

Returns
A copy of the base iterator.

Definition at line 375 of file transform_iterator.h.

◆ operator!=()

template<typename Iter , typename Op >
template<typename It >
bool TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator!= ( const UnaryTransformIterator< It, Op > &  other) const
inline

Inequality operator.

Template Parameters
ItAn iterator type that is implicitly convertible to base_iterator type.
Parameters
otherThe iterator to compare to this iterator.
Returns
True when the base iterators are not equal to each other, otherwise false.

Definition at line 357 of file transform_iterator.h.

◆ operator*()

template<typename Iter , typename Op >
reference TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator* ( ) const
inline

Dereference operator.

Returns
A transformed copy of the current base iterator value.

Definition at line 364 of file transform_iterator.h.

◆ operator++() [1/2]

template<typename Iter , typename Op >
this_type& TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object after it has been incremented.

Definition at line 323 of file transform_iterator.h.

◆ operator++() [2/2]

template<typename Iter , typename Op >
this_type TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator++ ( int  )
inline

Post-fix increment operator.

Returns
A copy of this object before it is incremented.

Definition at line 331 of file transform_iterator.h.

◆ operator->()

template<typename Iter , typename Op >
pointer TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator-> ( ) const
inline

Arrow dereference operator.

Returns
A pointer to a transformed copy of the current base iterator value.

Definition at line 370 of file transform_iterator.h.

◆ operator=() [1/2]

template<typename Iter , typename Op >
this_type& TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator= ( const this_type other)
inline

Copy operator.

Parameters
otherThe transform iterator to copy
Returns
A reference to this object

Definition at line 297 of file transform_iterator.h.

◆ operator=() [2/2]

template<typename Iter , typename Op >
template<typename It >
this_type& TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator= ( const UnaryTransformIterator< It, Op > &  other)
inline

Copy conversion operator.

This operator allows copying when the base iterators are implicitly convertible with each other.

Template Parameters
ItAn iterator type that is implicitly convertible to base_iterator .
Parameters
otherThe transform iterator to copy
Note
The operation type must be the same for both transform iterators.

Definition at line 313 of file transform_iterator.h.

◆ operator==()

template<typename Iter , typename Op >
template<typename It >
bool TiledArray::detail::UnaryTransformIterator< Iter, Op >::operator== ( const UnaryTransformIterator< It, Op > &  other) const
inline

Equality operator.

Template Parameters
ItAn iterator type that is implicitly convertible to base_iterator type.
Parameters
otherThe iterator to compare to this iterator.
Returns
True when the base iterators are equal to each other, otherwise false.

Definition at line 345 of file transform_iterator.h.

Friends And Related Function Documentation

◆ UnaryTransformIterator

template<typename Iter , typename Op >
template<typename , typename >
friend class UnaryTransformIterator
friend

Definition at line 256 of file transform_iterator.h.


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