QDjango
|
#include <QDjangoQuerySet.h>
Public Types | |
typedef std::bidirectional_iterator_tag | iterator_category |
Public Member Functions | |
const_iterator () | |
const_iterator (const const_iterator &other) | |
const T & | operator* () const |
const T * | operator-> () const |
bool | operator== (const const_iterator &other) const |
bool | operator!= (const const_iterator &other) const |
bool | operator< (const const_iterator &other) const |
bool | operator<= (const const_iterator &other) const |
bool | operator> (const const_iterator &other) const |
bool | operator>= (const const_iterator &other) const |
const_iterator & | operator++ () |
const_iterator | operator++ (int) |
const_iterator & | operator+= (int i) |
const_iterator | operator+ (int i) const |
const_iterator & | operator-= (int i) |
const_iterator | operator- (int i) const |
const_iterator & | operator-- () |
const_iterator | operator-- (int) |
difference_type | operator- (const const_iterator &other) const |
Friends | |
class | QDjangoQuerySet |
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:
std::bidirectional_iterator_tag QDjangoQuerySet< T >::const_iterator::iterator_category |
A synonym for std::bidirectional_iterator_tag indicating this iterator permits bidirectional access.
|
inline |
Constructs an uninitialized iterator.
Functions like operator*() and operator++() should not be called on an uninitialized iterator. Use const_iterator::operator=() to assign a value to it before using it.
|
inline |
Constructs a copy of other
.
|
inline |
Returns true
if other
points to a different item than this iterator; otherwise returns false
.
|
inline |
Returns the current item.
|
inline |
Returns an iterator to the item at i
positions forward from this iterator. (If i
is negative, the iterator goes backward.)
|
inline |
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.
|
inline |
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.
|
inline |
Advances the iterator by i
items. (If i
is negative, the iterator goes backward.)
|
inline |
Returns the number of items between the item pointed to by other
and the item pointed to by this iterator.
|
inline |
Returns an iterator to the item at i
positions backward from this iterator. (If i
is negative, the iterator goes forward.)
|
inline |
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.
|
inline |
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.
|
inline |
Makes the iterator go back by i
items. (If i
is negative, the iterator goes forward.)
|
inline |
Returns a pointer to the current item.
|
inline |
Returns true
if other points
to a position behind this iterator; otherwise returns false
.
|
inline |
Returns true
if other points
to a position behind or equal this iterator; otherwise returns false
.
|
inline |
Returns true
if other
points to the same item as this iterator; otherwise returns false
.
|
inline |
Returns true
if other points
to a position before this iterator; otherwise returns false
.
|
inline |
Returns true
if other points
to a position before or equal this iterator; otherwise returns false
.