CopperSpice API
1.9.2
|
The QLinkedList::iterator class provides an STL style iterator for QLinkedList. More...
Public Typedefs | |
using | iterator_category = std::bidirectional_iterator_tag |
Public Methods | |
iterator () | |
iterator (const iterator &other) | |
iterator (iterator &&other) | |
bool | operator!= (const_iterator other) const |
T & | operator* () const |
iterator & | operator++ () |
iterator | operator++ (int) |
iterator & | operator-- () |
iterator | operator-- (int) |
T * | operator-> () const |
iterator & | operator= (const iterator &other) |
iterator & | operator= (iterator &&other) |
bool | operator== (const_iterator other) const |
The QLinkedList::iterator class provides an STL style iterator for QLinkedList.
Equivalent to std::random_access_iterator_tag indicating this iterator is a random access 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.
QLinkedList< T >::iterator< T >::iterator | ( | const iterator< T > & | other | ) |
Constructs a copy of other.
QLinkedList< T >::iterator< T >::iterator | ( | iterator< T > && | other | ) |
Move constructs a new QLinkedList::iterator from other.
bool QLinkedList< T >::iterator< T >::operator!= | ( | const_iterator< T > | other | ) | const |
Returns true if other points to a different item than this iterator, otherwise returns false.
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.
The prefix ++ operator (++it
) advances the iterator to the next item in the list and returns an iterator to the new current item.
Calling this function on QLinkedList::end() leads to undefined behavior.
iterator QLinkedList< T >::iterator< T >::operator++ | ( | int | ) |
The postfix ++ operator (it++
) advances the iterator to the next item in the list and returns an iterator to the previously current item.
The prefix – operator (–it
) makes the preceding item current and returns an iterator to the new current item.
Calling this function on QLinkedList::begin() leads to undefined behavior.
iterator QLinkedList< T >::iterator< T >::operator-- | ( | int | ) |
The postfix – operator (it–
) makes the preceding item current and returns an iterator to the previously current item.
Returns a pointer to the current item.
iterator & QLinkedList< T >::iterator< T >::operator= | ( | const iterator< T > & | other | ) |
Copy assigns from other and returns a reference to this object.
iterator & QLinkedList< T >::iterator< T >::operator= | ( | iterator< T > && | other | ) |
Move assigns from other and returns a reference to this object.
bool QLinkedList< T >::iterator< T >::operator== | ( | const_iterator< T > | other | ) | const |
Returns true if other points to the same item as this iterator, otherwise returns false.