STXXL
1.4-dev
|
Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons.
Deriving from RandomAccessIterator is not possible since RandomAccessIterator need not be a class.
Definition at line 60 of file multiway_merge.h.
Public Types | |
typedef guarded_iterator < RandomAccessIterator, Comparator > | self_type |
Our own type. More... | |
typedef std::iterator_traits < RandomAccessIterator > ::value_type | value_type |
Value type of the iterator. More... | |
Public Member Functions | |
guarded_iterator (RandomAccessIterator begin, RandomAccessIterator end, Comparator &comp) | |
Constructor. More... | |
RandomAccessIterator & | iterator () |
Convert to wrapped iterator. More... | |
value_type & | operator* () |
Dereference operator. More... | |
self_type & | operator++ () |
Pre-increment operator. More... | |
Protected Attributes | |
Comparator & | comp |
Comparator. More... | |
RandomAccessIterator | current |
Current iterator position. More... | |
RandomAccessIterator | end |
End iterator of the sequence. More... | |
Friends | |
bool | operator< (self_type &bi1, self_type &bi2) |
Compare two elements referenced by guarded iterators. More... | |
bool | operator<= (self_type &bi1, self_type &bi2) |
Compare two elements referenced by guarded iterators. More... | |
typedef guarded_iterator<RandomAccessIterator, Comparator> stxxl::parallel::guarded_iterator< RandomAccessIterator, Comparator >::self_type |
Our own type.
Definition at line 64 of file multiway_merge.h.
typedef std::iterator_traits<RandomAccessIterator>::value_type stxxl::parallel::guarded_iterator< RandomAccessIterator, Comparator >::value_type |
Value type of the iterator.
Definition at line 67 of file multiway_merge.h.
|
inline |
Constructor.
Sets iterator to beginning of sequence.
begin | Begin iterator of sequence. |
end | End iterator of sequence. |
comp | Comparator provided for associated overloaded compare operators. |
Definition at line 85 of file multiway_merge.h.
|
inline |
Convert to wrapped iterator.
Definition at line 113 of file multiway_merge.h.
|
inline |
|
inline |
|
friend |
Compare two elements referenced by guarded iterators.
bi1 | First iterator. |
bi2 | Second iterator. |
True
if less. Definition at line 124 of file multiway_merge.h.
|
friend |
Compare two elements referenced by guarded iterators.
bi1 | First iterator. |
bi2 | Second iterator. |
True
if less equal. Definition at line 139 of file multiway_merge.h.
|
protected |
Comparator.
Definition at line 75 of file multiway_merge.h.
|
protected |
Current iterator position.
Definition at line 71 of file multiway_merge.h.
|
protected |
End iterator of the sequence.
Definition at line 73 of file multiway_merge.h.