CopperSpice API  1.7.2
QLinkedList< T >::const_iterator< T > Class Template Reference

The QLinkedList::const_iterator class provides an STL const iterator for QLinkedList. More...

Public Typedefs

using iterator_category = std::bidirectional_iterator_tag
 

Public Methods

 const_iterator ()
 
 const_iterator (const const_iterator &other)
 
 const_iterator (const iterator &other)
 
 const_iterator (const_iterator &&other)
 
 const_iterator (iterator &&other)
 
bool operator!= (const_iterator other) const
 
const T & operator* () const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator-- ()
 
const_iterator operator-- (int)
 
const T * operator-> () const
 
const_iteratoroperator= (const const_iterator &other)
 
const_iteratoroperator= (const iterator &other)
 
const_iteratoroperator= (const_iterator &&other)
 
const_iteratoroperator= (iterator &&other)
 
bool operator== (const_iterator other) const
 

Detailed Description

template<class T>
template<typename T>
class QLinkedList< T >::const_iterator< T >

The QLinkedList::const_iterator class provides an STL style const iterator for QLinkedList.

See also
QLinkedList::constBegin(), QLinkedList::constEnd(), QLinkedList::iterator

Member Typedef Documentation

template<class T >
template<typename T >
QLinkedList< T >::const_iterator< T >::iterator_category

A synonym for std::random_access_iterator_tag indicating this iterator is a random access iterator.

Constructor & Destructor Documentation

template<class T >
template<typename T >
QLinkedList< T >::const_iterator< T >::const_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.

See also
QLinkedList::begin(), QLinkedList::end()
template<class T >
template<typename T >
QLinkedList< T >::const_iterator< T >::const_iterator ( const const_iterator< T > &  other)

Copy constructs a new QLinkedList::const_iterator from other.

template<class T >
template<typename T >
QLinkedList< T >::const_iterator< T >::const_iterator ( const iterator other)

Copy constructs a new QLinkedList::const_iterator from other.

template<class T >
template<typename T >
QLinkedList< T >::const_iterator< T >::const_iterator ( const_iterator< T > &&  other)

Move constructs a new QLinkedList::const_iterator from other.

template<class T >
template<typename T >
QLinkedList< T >::const_iterator< T >::const_iterator ( iterator &&  other)

Move constructs a new QLinkedList::const_iterator from other.

Method Documentation

template<class T >
template<typename T >
bool QLinkedList< T >::const_iterator< T >::operator!= ( const_iterator< T >  other) const

Returns true if other points to a different item than this iterator, otherwise returns false.

See also
operator==()
template<class T >
template<typename T >
const T & QLinkedList< T >::const_iterator< T >::operator* ( ) const

Returns a reference to the current item.

See also
operator->()
template<class T >
template<typename T >
const_iterator & QLinkedList< T >::const_iterator< T >::operator++ ( )

The prefix ++ operator (++it) advances the iterator to the next item in the list and returns an iterator to the new current item.

See also
operator--()
template<class T >
template<typename T >
const_iterator QLinkedList< T >::const_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.

template<class T >
template<typename T >
const_iterator & QLinkedList< T >::const_iterator< T >::operator-- ( )

The prefix – operator (–it) makes the preceding item current and returns an iterator to the new current item.

See also
operator++()
template<class T >
template<typename T >
const_iterator QLinkedList< T >::const_iterator< T >::operator-- ( int  )

The postfix – operator (it–) makes the preceding item current and returns an iterator to the previously current item.

template<class T >
template<typename T >
const T * QLinkedList< T >::const_iterator< T >::operator-> ( ) const

Returns a pointer to the current item.

See also
operator*()
template<class T >
template<typename T >
const_iterator & QLinkedList< T >::const_iterator< T >::operator= ( const const_iterator< T > &  other)

Copy assigns from other and returns a reference to this object.

template<class T >
template<typename T >
const_iterator & QLinkedList< T >::const_iterator< T >::operator= ( const iterator other)

Copy assigns from other and returns a reference to this object.

template<class T >
template<typename T >
const_iterator & QLinkedList< T >::const_iterator< T >::operator= ( const_iterator< T > &&  other)

Move assigns from other and returns a reference to this object.

template<class T >
template<typename T >
const_iterator & QLinkedList< T >::const_iterator< T >::operator= ( iterator &&  other)

Move assigns from other and returns a reference to this object.

template<class T >
template<typename T >
bool QLinkedList< T >::const_iterator< T >::operator== ( const_iterator< T >  other) const

Returns true if other points to the same item as this iterator, otherwise returns false.

See also
operator!=()