Implements an STL style const iterator for QFuture.
More...
template<typename T>
class QFuture< T >::const_iterator
The QFuture::const_iterator class provides an STL style const iterator for QFuture. QFuture provides both STL style iterators and Java style iterators.
The default QFuture::const_iterator constructor creates an uninitialized iterator. You must initialize it using a QFuture function like QFuture::constBegin() or QFuture::constEnd() before you start iterating. Here is a typical loop that prints all the results available in a future.
- See also
- QFutureIterator, QFuture
Equivalent to std::bidirectional_iterator_tag.
template<typename T >
QFuture< T >::const_iterator::const_iterator |
( |
| ) |
|
|
inline |
template<typename T >
QFuture< T >::const_iterator::const_iterator |
( |
const const_iterator & |
other | ) |
|
|
inline |
Constructs a copy of other.
template<typename T >
bool QFuture< T >::const_iterator::operator!= |
( |
const const_iterator & |
other | ) |
const |
|
inline |
Returns true if other points to a different result than this iterator, otherwise returns false.
- See also
- operator==()
template<typename T >
const T & QFuture< T >::const_iterator::operator* |
( |
| ) |
const |
|
inline |
Returns the current result.
template<typename T >
const_iterator QFuture< T >::const_iterator::operator+ |
( |
size_type |
n | ) |
const |
|
inline |
Returns an iterator to the results at n positions forward from this iterator. If n is negative the iterator goes backward.
- See also
- operator-(), operator+=()
template<typename T >
const_iterator & QFuture< T >::const_iterator::operator++ |
( |
| ) |
|
|
inline |
The prefix ++ operator (++it
) advances the iterator to the next result in the future and returns an iterator to the new current result.
Calling this function on QFuture::constEnd() leads to undefined behavior.
- See also
- operator--()
template<typename T >
const_iterator QFuture< T >::const_iterator::operator++ |
( |
int |
| ) |
|
|
inline |
The postfix ++ operator (it++
) advances the iterator to the next result in the future and returns an iterator to the previously current result.
template<typename T >
const_iterator & QFuture< T >::const_iterator::operator+= |
( |
size_type |
n | ) |
|
|
inline |
template<typename T >
const_iterator QFuture< T >::const_iterator::operator- |
( |
size_type |
n | ) |
const |
|
inline |
Returns an iterator to the result at n positions backward from this iterator. If n is negative the iterator goes forward.
- See also
- operator+(), operator-=()
template<typename T >
const_iterator & QFuture< T >::const_iterator::operator-- |
( |
| ) |
|
|
inline |
The prefix – operator (–it
) makes the preceding result current and returns an iterator to the new current result.
Calling this function on QFuture::constBegin() leads to undefined behavior.
- See also
- operator++()
template<typename T >
const_iterator QFuture< T >::const_iterator::operator-- |
( |
int |
| ) |
|
|
inline |
The postfix – operator (it–
) makes the preceding result current and returns an iterator to the previously current result.
template<typename T >
const_iterator & QFuture< T >::const_iterator::operator-= |
( |
size_type |
n | ) |
|
|
inline |
Makes the iterator go back by n results. If n is negative the iterator goes forward.
- See also
- operator+=(), operator-()
template<typename T >
const T * QFuture< T >::const_iterator::operator-> |
( |
| ) |
const |
|
inline |
Returns a pointer to the current result.
template<typename T >
const_iterator & QFuture< T >::const_iterator::operator= |
( |
const const_iterator & |
other | ) |
|
|
inline |
Copy assigns from other and returns a reference to this object.
template<typename T >
bool QFuture< T >::const_iterator::operator== |
( |
const const_iterator & |
other | ) |
const |
|
inline |
Returns true if other points to the same result as this iterator, otherwise returns false.
- See also
- operator!=()