QMapConstIterator(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– 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 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