
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQFuture::const_iterator class provides an STL-style const iterator forQFuture.More...
| Header: | #include <const_iterator> |
| Since: | Qt 4.4 |
Note: All functions in this class arereentrant.
| typedef | difference_type |
| typedef | iterator_category |
| typedef | pointer |
| typedef | reference |
| typedef | value_type |
| const_iterator() | |
| const_iterator(const const_iterator & other) | |
| bool | operator!=(const const_iterator & other) const |
| const T & | operator*() const |
| const_iterator | operator+(int j) const |
| const_iterator & | operator++() |
| const_iterator | operator++(int) |
| const_iterator & | operator+=(int j) |
| const_iterator | operator-(int j) const |
| const_iterator & | operator--() |
| const_iterator | operator--(int) |
| const_iterator & | operator-=(int j) |
| const T * | operator->() const |
| const_iterator & | operator=(const const_iterator & other) |
| bool | operator==(const const_iterator & other) const |
TheQFuture::const_iterator class provides an STL-style const iterator forQFuture.
QFuture provides bothSTL-style iterators andJava-style iterators. The STL-style iterators are more low-level and more cumbersome to use; on the other hand, they are slightly faster and, for developers who already know STL, have the advantage of familiarity.
The defaultQFuture::const_iterator constructor creates an uninitialized iterator. You must initialize it using aQFuture function likeQFuture::constBegin() orQFuture::constEnd() before you start iterating. Here's a typical loop that prints all the results available in a future:
See alsoQFutureIterator andQFuture.
Typedef for ptrdiff_t. Provided for STL compatibility.
Typedef for std::bidirectional_iterator_tag. Provided for STL compatibility.
Typedef for const T *. Provided for STL compatibility.
Typedef for const T &. Provided for STL compatibility.
Typedef for T. Provided for STL compatibility.
Constructs an uninitialized iterator.
Functions like operator*() and operator++() should not be called on an uninitialized iterartor. Use operator=() to assign a value to it before using it.
See alsoQFuture::constBegin() andQFuture::constEnd().
Constructs a copy ofother.
Returns true ifother points to a different result than this iterator; otherwise returns false.
See alsooperator==().
Returns the current result.
Returns an iterator to the results atj positions forward from this iterator. (Ifj is negative, the iterator goes backward.)
See alsooperator-() andoperator+=().
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 onQFuture::constEnd() leads to undefined results.
See alsooperator--().
This is an overloaded function.
The postfix ++ operator (it++) advances the iterator to the next result in the future and returns an iterator to the previously current result.
Advances the iterator byj results. (Ifj is negative, the iterator goes backward.)
See alsooperator-=() andoperator+().
Returns an iterator to the result atj positions backward from this iterator. (Ifj is negative, the iterator goes forward.)
See alsooperator+() andoperator-=().
The prefix -- operator (--it) makes the preceding result current and returns an iterator to the new current result.
Calling this function onQFuture::constBegin() leads to undefined results.
See alsooperator++().
This is an overloaded function.
The postfix -- operator (it--) makes the preceding result current and returns an iterator to the previously current result.
Makes the iterator go back byj results. (Ifj is negative, the iterator goes forward.)
See alsooperator+=() andoperator-().
Returns a pointer to the current result.
Assignsother to this iterator.
Returns true ifother points to the same result as this iterator; otherwise returns false.
See alsooperator!=().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.