![]() |
CopperSpice API
1.9.2
|
Provides an STL style iterator for QSet. More...
Public Typedefs | |
using | iterator_category = std::forward_iterator_tag |
Public Methods | |
iterator () | |
iterator (const iterator &other) | |
iterator (iterator &&other) | |
const T & | operator* () const |
iterator | operator+ (size_type n) const |
iterator & | operator++ () |
iterator | operator++ (int) |
iterator & | operator+= (size_type n) |
const T * | operator-> () const |
iterator & | operator= (const iterator &other) |
iterator & | operator= (iterator &&other) |
bool | operator== (iterator other) const |
The QSet::iterator class provides an STL style iterator for QSet.
QSet< T >::iterator::iterator_category |
Equivalent to std::forward_iterator_tag indicating this iterator is a forward iterator.
QSet< 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.
Constructs a copy of other.
Move constructs a new QSet::iterator from other.
const T & QSet< T >::iterator::operator* | ( | ) | const |
Returns a reference to the current item.
Returns an iterator to the item at n positions forward from this iterator. If n is negative the iterator goes backward.
This operation can be slow for large values of n.
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 QSet::constEnd() leads to undefined behavior.
The postfix ++ operator (it++
) advances the iterator to the next item in the set and returns an iterator to the previously current item.
Advances the iterator by n items. If n is negative the iterator goes backward.
This operation can be slow for large values of n.
const T * QSet< T >::iterator::operator-> | ( | ) | const |
Returns a pointer to the current item.
Copy assigns from other and returns a reference to this object.
Move assigns from other and returns a reference to this object.