| Classes - Annotated - Tree - Functions - Home - Structure

# QMapConstIterator Class Reference

The QMapConstIterator class provides an iterator for QMap. More...

`#include <qmap.h>`

List of all member functions.

## Public Members

- 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

## Detailed 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 to modify the values of the map since this would break the const semantics.

For more informations on QMap iterators see QMapIterator.

See also QMap and QMapIterator.

## Member Function Documentation

### QMapConstIterator::QMapConstIterator ()

Constructs an uninitialized iterator.

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

Constructs an iterator starting at node p.

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

Constructs a copy of the iterator.

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

Constructs a copy of the iterator.

### const T& QMapConstIterator::data () const

Returns a const reference to the data of the current item.

### const K& QMapConstIterator::key () const

Returns a const reference to the current key.

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

Compares both iterators and returns TRUE if they point to different items.

### const T& QMapConstIterator::operator* () const

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

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

Compares both iterators and returns TRUE if they point to the same item.

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):

This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.