QMapConstIterator(3qt)
π QMapConstIterator β a whole mood (from the 3qt manual, bestie) π
okay so. you opened the qmapconstiterator page in section 3qt and you're like "what is this". don't worry. I got you. this is the iterator that reads your QMap and does NOT touch anything. very demure, very mindful. π
β¨ NAME β¨
QMapConstIterator β the iterator for QMap. that's it, that's the whole job. π
πΈ 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 π
so QMapConstIterator is the class that gives you an iterator for QMap. iconic behaviour honestly.
and here's the tea: unlike QMapIterator, this one is built for iterating over a const map. it literally will not let you modify the values, because doing that would break the const semantics and we do NOT do that here. it's giving boundaries. π§
want more lore on QMap iterators? go read QMapIterator and the QMap example, they spill everything. β¨
see also:QMap,QMapIterator, Qt Template Library Classes, and Non-GUI Classes. all the besties. π«Ά
π Member Type Documentation π
QMapConstIterator::iterator_category
the type of iterator category, which is std::bidirectional_iterator_tag. so it walks both ways, forward and back. main character energy fr. πΆβοΈβ‘οΈβ¬
οΈπΆβοΈ
QMapConstIterator::pointer
a const pointer to value_type. no writing. only looking. π
QMapConstIterator::reference
a const reference to value_type. same vibe, reference edition. β¨
QMapConstIterator::value_type
the type of the const value. yes queen, it's const. π
π§ MEMBER FUNCTION DOCUMENTATION π§
QMapConstIterator::QMapConstIterator ()
constructs an uninitialized iterator. it exists, but it doesn't know where it's going. relatable. π
QMapConstIterator::QMapConstIterator ( QMapNode<K, T> * p )
constructs an iterator starting at node p. now it has a destination. slay. π
QMapConstIterator::QMapConstIterator ( const QMapConstIterator<K, T> & it )
constructs a copy of the iterator, it. twin behaviour. π―
QMapConstIterator::QMapConstIterator ( const QMapIterator<K, T> & it )
constructs a copy of the iterator, it. yes, from a QMapIterator this time. glow-up from non-const to const. β¨
const T & QMapConstIterator::data () const
returns a const reference to the current item's data. just the data, nothing extra. π
const K & QMapConstIterator::key () const
returns a const reference to the current item's key. the key stays put, as it should. π
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 it returns TRUE. they're not the same β TRUE. periodt. π
const T & QMapConstIterator::operator* () const
the dereference operator. returns a const reference to the current item's data. literally the same as data(). same thing, different outfit. π
QMapConstIterator<K, T> & QMapConstIterator::operator++ ()
prefix ++ makes the succeeding item current and returns an iterator pointing to the new current item. but β and this is important bestie β the iterator cannot check whether it reached the end of the map. incrementing the iterator returned by end() causes undefined results. so don't. I'm begging. π
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. same warning as before: the iterator cannot check whether it reached the end of the map, and incrementing the iterator returned by end() causes undefined results. the danger is undefeated. π
QMapConstIterator<K, T> & QMapConstIterator::operator-- ()
prefix -- makes the previous item current and returns an iterator pointing to the new current item. and again, the iterator cannot check whether it reached the beginning of the map. decrementing the iterator returned by begin() causes undefined results. going backwards past the start = chaos. π
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, and decrementing the iterator returned by begin() causes undefined results. yes, still. πΈ
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 it returns FALSE. matched energies detected. π
π₯ SEE ALSO π₯
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.
π¦ AUTHOR π¦
Generated automatically from the source code. (the code wrote its own autobiography, we love that for it.) β¨
π 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. ngl, it's a little renegade of them. π
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). don't forget the deets, they need them to fix it. π
and that's the whole page, bestie!! this absolute icon of a man page was brought to you by Trolltech AS, dated 2 February 2007, living in the QMapConstIterator(3qt) section. go forth and iterate const-ly. no cap. π
β¨π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms