QCacheIterator(3qt)
π QCacheIterator β the manual page, but make it make sense π
okay so bestie, you're reading QCacheIterator(3qt), the Qt manual page. yes it's a 3qt man page. yes we're doing this. grab a snack π
β¨ NAME β¨
QCacheIterator β iterator for QCache collections. that's it, that's the whole name section, she's simple, she's iconic π
β¨ SYNOPSIS β¨
#include <qcache.h>
π Public Members π
QCacheIterator ( const QCache<type> & cache )
QCacheIterator ( const QCacheIterator<type> & ci )
QCacheIterator<type> & operator= ( const QCacheIterator<type> & ci )
uint count () const
bool isEmpty () const
bool atFirst () const
bool atLast () const
type * toFirst ()
type * toLast ()
operator type * () const
type * current () const
QString currentKey () const
type * operator() ()
type * operator++ ()
type * operator+= ( uint jump )
type * operator-- ()
type * operator-= ( uint jump )
like look at her. seventeen little functions. no cap, she's serving π«Ά
β¨ DESCRIPTION β¨
so QCacheIterator is literally the iterator class for QCache collections. that's the whole job. π
heads up bestie: the traversal order is arbitrary. you are not guaranteed any particular order. if new objects get inserted into the cache while your iterator is out here being active, the iterator may or may not see them. so don't build your whole personality around the order, fr fr. π
Multiple iterators are completely independent β even when they're operating on the same QCache. like two besties reading the same book at different pages, no drama. and QCache updates all iterators that refer an item when that item is removed. so nobody's left pointing at a ghost π»
QCacheIterator gives you an operator++() and an operator+=() to traverse the cache. then current() and currentKey() are your girls for accessing the current cache item and its key. atFirst() and atLast() return TRUE if the iterator points to the first or last item in the cache respectively. isEmpty() returns TRUE if the cache is empty, and count() returns the number of items in the cache. very demure, very mindful β¨
another heads up:atFirst()andatLast()refer to the iterator's arbitrary ordering, not to the cache's internal least recently used list. two completely different things bestie, do not conflate them π
See also QCache, Collection Classes, and Non-GUI Classes. πΈ
β¨ MEMBER FUNCTION DOCUMENTATION β¨
π QCacheIterator::QCacheIterator ( const QCache<type> & cache )
Constructs an iterator for cache. the current iterator item gets set to point to the first item in the cache. hello world, first item, nice to meet you π
π QCacheIterator::QCacheIterator ( const QCacheIterator<type> & ci )
Constructs an iterator for the same cache as ci. the new iterator starts at the same item as ci.current(), but from there on it moves independently. twin energy, but make it separate paths π¦
π bool QCacheIterator::atFirst () const
Returns TRUE if the iterator points to the first item in the cache; otherwise returns FALSE. and yes β note that this refers to the iterator's arbitrary ordering, not to the cache's internal least recently used list. say it with me: arbitrary ordering. not. the. LRU. list. π
See also toFirst() and atLast().
π bool QCacheIterator::atLast () const
Returns TRUE if the iterator points to the last item in the cache; otherwise returns FALSE. and once again β note that this refers to the iterator's arbitrary ordering, not to the cache's internal least recently used list. she said it twice because it matters, ok π€
See also toLast() and atFirst().
π uint QCacheIterator::count () const
Returns the number of items in the cache on which this iterator operates. it's giving census day π
See also isEmpty().
π type * QCacheIterator::current () const
Returns a pointer to the current iterator item. your main character, right there β¨
π QString QCacheIterator::currentKey () const
Returns the key for the current iterator item. the name tag of the main character π·οΈ
π bool QCacheIterator::isEmpty () const
Returns TRUE if the cache is empty, i.e. count() == 0; otherwise it returns FALSE. nothing in here, nobody home, go home π
See also count().
π QCacheIterator::operator type * () const
Cast operator. Returns a pointer to the current iterator item. Same as current(). literally the same thing, just a different outfit π
π type * QCacheIterator::operator() ()
Makes the succeeding item current and returns the original current item. so you get the old one back and the new one takes the crown.
If the current iterator item was the last item in the cache or if it was 0, 0 is returned. end of the line, nothing left, bye π
π type * QCacheIterator::operator++ ()
Prefix ++ makes the iterator point to the item just after current() and makes that the new current item for the iterator. If current() was the last item, operator++() returns 0. hit the wall, bestie π§±
π type * QCacheIterator::operator+= ( uint jump )
Returns the item jump positions after the current item, or 0 if it is beyond the last item. makes this the current item. skip ahead, but only if there's something to land on π¦
π type * QCacheIterator::operator-- ()
Prefix -- makes the iterator point to the item just before current() and makes that the new current item for the iterator. If current() was the first item, operator--() returns 0. you've reached the top of the stairs, nothing above πͺ
π type * QCacheIterator::operator-= ( uint jump )
Returns the item jump positions before the current item, or 0 if it is before the first item. makes this the current item. rewinding, but politely βͺ
π QCacheIterator<type> & QCacheIterator::operator= ( const QCacheIterator<type> & ci )
Makes this an iterator for the same cache as ci. the new iterator starts at the same item as ci.current(), but moves independently thereafter. matching outfits, different plans π
π type * QCacheIterator::toFirst ()
Sets the iterator to point to the first item in the cache and returns a pointer to the item.
Sets the iterator to 0 and returns 0 if the cache is empty. no first item exists, so, zero. that's the answer. π
See also toLast() and isEmpty().
π type * QCacheIterator::toLast ()
Sets the iterator to point to the last item in the cache and returns a pointer to the item.
Sets the iterator to 0 and returns 0 if the cache is empty. same deal, different end π―
See also toFirst() and isEmpty().
β¨ SEE ALSO β¨
go read the lore, iykyk π
β¨ COPYRIGHT β¨
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. legal girls stay winning πΌβ¨
β¨ AUTHOR β¨
Generated automatically from the source code. not a human author, a robot did this, and honestly? slay π€π
β¨ 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. π«Ά (they're being so nice about it, we love to see it)
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. > not officially supported!! it's a convenience, a little treat, a snack π
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qcacheiterator.3qt) and the Qt version (3.3.8). include both!! don't make them guess bestie π
okay that's the whole page!! mwah π this was Trolltech AS, dated 2 February 2007, and it's from Qt version 3.3.8 β and that's the vibe check, we passed it, byeeee ππβ¨
π¦ 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