qmapconstiterator.3qt man page

QMapConstIterator — Iterator for QMap

Synopsis

#include <qmap.h>

Public Members

typedef std::bidirectional_iterator_tag iterator_category

typedef T value_type

typedef const T * pointer

typedef const T & reference

QMapConstIterator ()

QMapConstIterator ( QMapNode<K, T> * p )

QMapConstIterator ( const QMapConstIterator<K, T> & it )

QMapConstIterator ( const QMapIterator<K, T> & it )

bool operator== ( const QMapConstIterator<K, T> & it ) const

bool operator!= ( const QMapConstIterator<K, T> & it ) const

const T & operator* () const

const K & key () const

const T & data () const

QMapConstIterator<K, T> & operator++ ()

QMapConstIterator<K, T> operator++ ( int )

QMapConstIterator<K, T> & operator-- ()

QMapConstIterator<K, T> operator-- ( int )

Description

The QMapConstIterator class provides an iterator for QMap.

In contrast to QMapIterator, this class is used to iterate over a const map. It does not allow you to modify the values of the map because this would break the const semantics.

For more information on QMap iterators, see QMapIterator and the QMap example.

See also QMap, QMapIterator, Qt Template Library Classes, and Non-GUI Classes.

Member Type Documentation

QMapConstIterator::iterator_category

The type of iterator category, std::bidirectional_iterator_tag.

QMapConstIterator::pointer

Const pointer to value_type.

QMapConstIterator::reference

Const reference to value_type.

QMapConstIterator::value_type

The type of const value.

QMapConstIterator::QMapConstIterator ()

Constructs an uninitialized iterator.

QMapConstIterator::QMapConstIterator ( QMapNode<K, T> * p )

Constructs an iterator starting at node p.

QMapConstIterator::QMapConstIterator ( const QMapConstIterator<K, T> & it )

Constructs a copy of the iterator, it.

QMapConstIterator::QMapConstIterator ( const QMapIterator<K, T> & it )

Constructs a copy of the iterator, it.

const T & QMapConstIterator::data () const

Returns a const reference to the current item's data.

const K & QMapConstIterator::key () const

Returns a const reference to the current item's key.

bool QMapConstIterator::operator!= ( const QMapConstIterator<K, T> & it ) const

Compares the iterator to the it iterator and returns FALSE if they point to the same item; otherwise returns TRUE.

const T & QMapConstIterator::operator* () const

Dereference operator. Returns a const reference to the current item's data. The same as data().

QMapConstIterator<K, T> & QMapConstIterator::operator++ ()

Prefix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the map. Incrementing the iterator returned by end() causes undefined results.

QMapConstIterator<K, T> QMapConstIterator::operator++ ( int )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Postfix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the map. Incrementing the iterator returned by end() causes undefined results.

QMapConstIterator<K, T> & QMapConstIterator::operator-- ()

Prefix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the map. Decrementing the iterator returned by begin() causes undefined results.

QMapConstIterator<K, T> QMapConstIterator::operator-- ( int )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Postfix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the map. Decrementing the iterator returned by begin() causes undefined results.

bool QMapConstIterator::operator== ( const QMapConstIterator<K, T> & it ) const

Compares the iterator to the it iterator and returns TRUE if they point to the same item; otherwise returns FALSE.

See Also

http://doc.trolltech.com/qmapconstitera… http://www.trolltech.com/faq/tech.html

Author

Generated automatically from the source code.

Bugs

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qmapconstiterator.3qt) and the Qt version (3.3.8).

Referenced By

QMapConstIterator.3qt(3) is an alias of qmapconstiterator.3qt(3).

2 February 2007 Trolltech AS