GNU g++  v5.2.1
GNU Standard C++
__gnu_parallel::_GuardedIterator< _RAIter, _Compare > Class Template Reference

_Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons. More...

#include <multiway_merge.h>

Collaboration diagram for __gnu_parallel::_GuardedIterator< _RAIter, _Compare >:

Public Member Functions

 _GuardedIterator (_RAIter __begin, _RAIter __end, _Compare &__comp)
 Constructor. More...
 
 operator _RAIter ()
 Convert to wrapped iterator. More...
 
std::iterator_traits< _RAIter >::value_type & operator* ()
 Dereference operator. More...
 
_GuardedIterator< _RAIter, _Compare > & operator++ ()
 Pre-increment operator. More...
 

Private Attributes

_Compare & __comp
 _Compare. More...
 
_RAIter _M_current
 Current iterator __position. More...
 
_RAIter _M_end
 End iterator of the sequence. More...
 

Friends

bool operator< (_GuardedIterator< _RAIter, _Compare > &__bi1, _GuardedIterator< _RAIter, _Compare > &__bi2)
 Compare two elements referenced by guarded iterators. More...
 
bool operator<= (_GuardedIterator< _RAIter, _Compare > &__bi1, _GuardedIterator< _RAIter, _Compare > &__bi2)
 Compare two elements referenced by guarded iterators. More...
 

Detailed Description

template<typename _RAIter, typename _Compare>
class __gnu_parallel::_GuardedIterator< _RAIter, _Compare >

_Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons.

The implicit supremum comes with a performance cost.

Deriving from _RAIter is not possible since _RAIter need not be a class.

Constructor & Destructor Documentation

template<typename _RAIter , typename _Compare >
__gnu_parallel::_GuardedIterator< _RAIter, _Compare >::_GuardedIterator ( _RAIter  __begin,
_RAIter  __end,
_Compare &  __comp 
)
inline

Constructor.

Sets iterator to beginning of sequence.

Parameters
__beginBegin iterator of sequence.
__endEnd iterator of sequence.
__compComparator provided for associated overloaded compare operators.

Member Function Documentation

template<typename _RAIter , typename _Compare >
__gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator _RAIter ( )
inline

Convert to wrapped iterator.

Returns
Wrapped iterator.

References __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::_M_current.

template<typename _RAIter , typename _Compare >
std::iterator_traits<_RAIter>::value_type& __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator* ( )
inline

Dereference operator.

Returns
Referenced element.

References __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::_M_current.

template<typename _RAIter , typename _Compare >
_GuardedIterator<_RAIter, _Compare>& __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator++ ( )
inline

Pre-increment operator.

Returns
This.

References __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::_M_current.

Friends And Related Function Documentation

template<typename _RAIter , typename _Compare >
bool operator< ( _GuardedIterator< _RAIter, _Compare > &  __bi1,
_GuardedIterator< _RAIter, _Compare > &  __bi2 
)
friend

Compare two elements referenced by guarded iterators.

Parameters
__bi1First iterator.
__bi2Second iterator.
Returns
true if less.
template<typename _RAIter , typename _Compare >
bool operator<= ( _GuardedIterator< _RAIter, _Compare > &  __bi1,
_GuardedIterator< _RAIter, _Compare > &  __bi2 
)
friend

Compare two elements referenced by guarded iterators.

Parameters
__bi1First iterator.
__bi2Second iterator.
Returns
True if less equal.

Member Data Documentation

template<typename _RAIter , typename _Compare >
_Compare& __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::__comp
private

_Compare.

template<typename _RAIter , typename _Compare >
_RAIter __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::_M_end
private

End iterator of the sequence.


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