CopperSpice API
1.9.1
|
The QVector::iterator class provides an STL style iterator for QVector and QStack. More...
Public Typedefs | |
using | iterator_category = std::random_access_iterator_tag |
The QVector::iterator class provides an STL style iterator for QVector and QStack.
QVector< T >::iterator::iterator_category |
Equivalent to std::random_access_iterator_tag indicating this iterator is a random access iterator.
QVector< T >::iterator::iterator | ( | ) |
Constructs an uninitialized iterator.
Functions like operator*() and operator++() should not be called on an uninitialized iterator. Use operator=() to assign a value to it before using it.
Copy constructs a new QVector::iterator::iterator from other.
Move constructs a new QVector::iterator::iterator from other.
Move constructs a new QVector::iterator from other.
Returns true if other points to a different item than this iterator, otherwise returns false.
T & QVector< T >::iterator::operator* | ( | ) | const |
Returns a reference to the current item. You can change the value of an item by using operator*() on the left side of an assignment.
Returns an iterator to the item n positions after this iterator. If n is negative the iterator goes backward.
The prefix ++ operator advances the iterator to the next item in the vector and returns the new iterator.
Calling this function on QVector::end() leads to undefined behavior.
The postfix ++ operator advances the iterator to the next item in the vector and returns the old iterator.
Advances the iterator by n items. If n is negative the iterator goes backward.
Returns the number of items between the item pointed to by other and the item pointed to by this iterator.
Returns an iterator to the item at n positions backward from this iterator. If n is negative the iterator goes forward.
The prefix – operator decrements the iterator to the previous item in the vector and returns the new iterator.
Calling this method on QVector::begin() leads to undefined behavior.
The postfix – operator decrements the iterator to the previous item in the vector and returns the old iterator.
Makes the iterator go back by n items. If n is negative the iterator goes forward.
T * QVector< T >::iterator::operator-> | ( | ) | const |
Returns a pointer to the current item.
bool QVector< T >::iterator::operator< | ( | const const_iterator & | other | ) | const |
Returns true if this iterator is closer to the beginning of the vector than the other iterator.
Returns true if this iterator is closer to the beginning of the vector than the other iterator.
bool QVector< T >::iterator::operator<= | ( | const const_iterator & | other | ) | const |
Returns true if the item pointed to by this iterator is less than or equal to the item pointed to by the other iterator.
Returns true if the item pointed to by this iterator is less than or equal to the item pointed to by the other iterator.
Copy assigns from other and returns a reference to this object.
Move assigns from other and returns a reference to this object.
Returns true if other points to the same item as this iterator, otherwise returns false.
bool QVector< T >::iterator::operator> | ( | const const_iterator & | other | ) | const |
Returns true if the item pointed to by this iterator is greater than the item pointed to by the other iterator.
Returns true if the item pointed to by this iterator is greater than the item pointed to by the other iterator.
bool QVector< T >::iterator::operator>= | ( | const const_iterator & | other | ) | const |
Returns true if the item pointed to by this iterator is greater than or equal to the item pointed to by the other iterator.
Returns true if the item pointed to by this iterator is greater than or equal to the item pointed to by the other iterator.
Returns a reference to the item at position this + n.