Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

TQMapConstIterator Class Reference

The TQMapConstIterator class provides an iterator for TQMap. More...

#include <tqmap.h>

List of all member functions.

Public Members


Detailed Description

The TQMapConstIterator class provides an iterator for TQMap.

In contrast to TQMapIterator, 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 TQMap iterators, see TQMapIterator and the TQMap example.

See also TQMap, TQMapIterator, TQt Template Library Classes, and Non-GUI Classes.


Member Type Documentation

TQMapConstIterator::iterator_category

The type of iterator category, std::bidirectional_iterator_tag.

TQMapConstIterator::pointer

Const pointer to value_type.

TQMapConstIterator::reference

Const reference to value_type.

TQMapConstIterator::value_type

The type of const value.

Member Function Documentation

TQMapConstIterator::TQMapConstIterator ()

Constructs an uninitialized iterator.

TQMapConstIterator::TQMapConstIterator ( TQMapNode<K, T> * p )

Constructs an iterator starting at node p.

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

Constructs a copy of the iterator, it.

TQMapConstIterator::TQMapConstIterator ( const TQMapIterator<K, T> & it )

Constructs a copy of the iterator, it.

const T & TQMapConstIterator::data () const

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

const K & TQMapConstIterator::key () const

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

bool TQMapConstIterator::operator!= ( const TQMapConstIterator<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 & TQMapConstIterator::operator* () const

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

TQMapConstIterator<K, T> & TQMapConstIterator::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.

TQMapConstIterator<K, T> TQMapConstIterator::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.

TQMapConstIterator<K, T> & TQMapConstIterator::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.

TQMapConstIterator<K, T> TQMapConstIterator::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 TQMapConstIterator::operator== ( const TQMapConstIterator<K, T> & it ) const

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


This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.


Copyright © 2007 TrolltechTrademarks
TQt 3.3.8