1QIntCacheIterator(3qt)                                  QIntCacheIterator(3qt)
2
3
4

NAME

6       QIntCacheIterator - Iterator for QIntCache collections
7

SYNOPSIS

9       #include <qintcache.h>
10
11   Public Members
12       QIntCacheIterator ( const QIntCache<type> & cache )
13       QIntCacheIterator ( const QIntCacheIterator<type> & ci )
14       QIntCacheIterator<type> & operator= ( const QIntCacheIterator<type> &
15           ci )
16       uint count () const
17       bool isEmpty () const
18       bool atFirst () const
19       bool atLast () const
20       type * toFirst ()
21       type * toLast ()
22       operator type * () const
23       type * current () const
24       long currentKey () const
25       type * operator() ()
26       type * operator++ ()
27       type * operator+= ( uint jump )
28       type * operator-- ()
29       type * operator-= ( uint jump )
30

DESCRIPTION

32       The QIntCacheIterator class provides an iterator for QIntCache
33       collections.
34
35       Note that the traversal order is arbitrary; you are not guaranteed any
36       particular order. If new objects are inserted into the cache while the
37       iterator is active, the iterator may or may not see them.
38
39       Multiple iterators are completely independent, even when they operate
40       on the same QIntCache. QIntCache updates all iterators that refer an
41       item when that item is removed.
42
43       QIntCacheIterator provides an operator++(), and an operator+=() to
44       traverse the cache; current() and currentKey() to access the current
45       cache item and its key; atFirst() atLast(), which return TRUE if the
46       iterator points to the first/last item in the cache; isEmpty(), which
47       returns TRUE if the cache is empty; and count(), which returns the
48       number of items in the cache.
49
50       Note that atFirst() and atLast() refer to the iterator's arbitrary
51       ordering, not to the cache's internal least recently used list.
52
53       See also QIntCache, Collection Classes, and Non-GUI Classes.
54

MEMBER FUNCTION DOCUMENTATION

QIntCacheIterator::QIntCacheIterator ( const QIntCache<type> & cache )

57       Constructs an iterator for cache. The current iterator item is set to
58       point to the first item in the cache (or rather, the first item is
59       defined to be the item at which this constructor sets the iterator to
60       point).
61

QIntCacheIterator::QIntCacheIterator ( const QIntCacheIterator<type> & ci )

63       Constructs an iterator for the same cache as ci. The new iterator
64       starts at the same item as ci.current(), but moves independently from
65       there on.
66

bool QIntCacheIterator::atFirst () const

68       Returns TRUE if the iterator points to the first item in the cache;
69       otherwise returns FALSE. Note that this refers to the iterator's
70       arbitrary ordering, not to the cache's internal least recently used
71       list.
72
73       See also toFirst() and atLast().
74

bool QIntCacheIterator::atLast () const

76       Returns TRUE if the iterator points to the last item in the cache;
77       otherwise returns FALSE. Note that this refers to the iterator's
78       arbitrary ordering, not to the cache's internal least recently used
79       list.
80
81       See also toLast() and atFirst().
82

uint QIntCacheIterator::count () const

84       Returns the number of items in the cache on which this iterator
85       operates.
86
87       See also isEmpty().
88

type * QIntCacheIterator::current () const

90       Returns a pointer to the current iterator item.
91

long QIntCacheIterator::currentKey () const

93       Returns the key for the current iterator item.
94

bool QIntCacheIterator::isEmpty () const

96       Returns TRUE if the cache is empty; otherwise returns FALSE.
97
98       See also count().
99

QIntCacheIterator::operator type * () const

101       Cast operator. Returns a pointer to the current iterator item. Same as
102       current().
103

type * QIntCacheIterator::operator() ()

105       Makes the succeeding item current and returns the original current
106       item.
107
108       If the current iterator item was the last item in the cache or if it
109       was 0, 0 is returned.
110

type * QIntCacheIterator::operator++ ()

112       Prefix ++ makes the iterator point to the item just after current(),
113       and makes it the new current item for the iterator. If current() was
114       the last item, operator--() returns 0.
115

type * QIntCacheIterator::operator+= ( uint jump )

117       Returns the item jump positions after the current item, or 0 if it is
118       beyond the last item. Makes this the current item.
119

type * QIntCacheIterator::operator-- ()

121       Prefix -- makes the iterator point to the item just before current(),
122       and makes it the new current item for the iterator. If current() was
123       the first item, operator--() returns 0.
124

type * QIntCacheIterator::operator-= ( uint jump )

126       Returns the item jump positions before the current item, or 0 if it is
127       beyond the first item. Makes this the current item.
128

QIntCacheIterator<type> & QIntCacheIterator::operator= ( const

130       QIntCacheIterator<type> & ci )
131       Makes this an iterator for the same cache as ci. The new iterator
132       starts at the same item as ci.current(), but moves independently
133       thereafter.
134

type * QIntCacheIterator::toFirst ()

136       Sets the iterator to point to the first item in the cache and returns a
137       pointer to the item.
138
139       Sets the iterator to 0, and returns 0, if the cache is empty.
140
141       See also toLast() and isEmpty().
142

type * QIntCacheIterator::toLast ()

144       Sets the iterator to point to the last item in the cache and returns a
145       pointer to the item.
146
147       Sets the iterator to 0, and returns 0, if the cache is empty.
148
149       See also toFirst() and isEmpty().
150
151

SEE ALSO

153       http://doc.trolltech.com/qintcacheiterator.html
154       http://www.trolltech.com/faq/tech.html
155
157       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
158       license file included in the distribution for a complete license
159       statement.
160

AUTHOR

162       Generated automatically from the source code.
163

BUGS

165       If you find a bug in Qt, please report it as described in
166       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
167       help you. Thank you.
168
169       The definitive Qt documentation is provided in HTML format; it is
170       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
171       web browser. This man page is provided as a convenience for those users
172       who prefer man pages, although this format is not officially supported
173       by Trolltech.
174
175       If you find errors in this manual page, please report them to qt-
176       bugs@trolltech.com.  Please include the name of the manual page
177       (qintcacheiterator.3qt) and the Qt version (3.3.8).
178
179
180
181Trolltech AS                    2 February 2007         QIntCacheIterator(3qt)
Impressum