#include <QDjangoQuerySet.h>
template<class T>
class QDjangoQuerySet< T >::const_iterator
The QDjangoQuerySet::const_iterator class provides an STL-style const iterator for QDjangoQuerySet.
QDjangoQuerySet::const_iterator allows you to iterate over a QDjangoQuerySet. As a const iterator it doesn't permit you to modify the QDjangoQuerySet.
The default QDjangoQuerySet::const_iterator constructor creates an uninitialized iterator. You must initialize it using a QDjangoQuerySet function like QDjangoQuerySet::constBegin(), or QDjangoQuerySet::constEnd() before you can start iterating. Here's a typical loop that prints all the objects stored in a set:
foreach(const Weblog::Post &p, posts) {
cout << p << endl;
}
◆ iterator_category
A synonym for std::bidirectional_iterator_tag indicating this iterator permits bidirectional access.
◆ const_iterator() [1/2]
◆ const_iterator() [2/2]
Constructs a copy of other.
◆ operator!=()
Returns true if other points to a different item than this iterator; otherwise returns false.
- See also
- operator==()
◆ operator*()
◆ operator+()
Returns an iterator to the item at i positions forward from this iterator. (If i is negative, the iterator goes backward.)
- See also
- operator-() and operator+=()
◆ operator++() [1/2]
The prefix ++ operator (++it) advances the iterator to the next item in the set and returns an iterator to the new current item.
Calling this function on QDjangoQuerySet::end() leads to undefined results.
- See also
- operator--()
◆ operator++() [2/2]
The postfix ++ operator (it++) advances the iterator to the next item in the set and returns an iterator to the previously current item.
Calling this function on QDjangoQuerySet::end() leads to undefined results.
- See also
- operator--(int)
◆ operator+=()
Advances the iterator by i items. (If i is negative, the iterator goes backward.)
- See also
- operator-=() and operator+().
◆ operator-() [1/2]
Returns the number of items between the item pointed to by other and the item pointed to by this iterator.
◆ operator-() [2/2]
Returns an iterator to the item at i positions backward from this iterator. (If i is negative, the iterator goes forward.)
- See also
- operator+() and operator-=()
◆ operator--() [1/2]
The prefix – operator (–it) makes the preceding item current and returns an iterator to the new current item.
Calling this function on QDjangoQuerySet::begin() leads to undefined results.
- See also
- operator++().
◆ operator--() [2/2]
The postfix – operator (it–) makes the preceding item current and returns an iterator to the previously current item.
Calling this function on QDjangoQuerySet::begin() leads to undefined results.
- See also
- operator++(int).
◆ operator-=()
Makes the iterator go back by i items. (If i is negative, the iterator goes forward.)
- See also
- operator+=() and operator-()
◆ operator->()
Returns a pointer to the current item.
- See also
- operator*()
◆ operator<()
Returns true if other points to a position behind this iterator; otherwise returns false.
◆ operator<=()
Returns true if other points to a position behind or equal this iterator; otherwise returns false.
◆ operator==()
Returns true if other points to the same item as this iterator; otherwise returns false.
- See also
- operator!=()
◆ operator>()
Returns true if other points to a position before this iterator; otherwise returns false.
◆ operator>=()
Returns true if other points to a position before or equal this iterator; otherwise returns false.
The documentation for this class was generated from the following file: