1QAsciiCacheIterator(3qt) QAsciiCacheIterator(3qt)
2
3
4
6 QAsciiCacheIterator - Iterator for QAsciiCache collections
7
9 #include <qasciicache.h>
10
11 Public Members
12 QAsciiCacheIterator ( const QAsciiCache<type> & cache )
13 QAsciiCacheIterator ( const QAsciiCacheIterator<type> & ci )
14 QAsciiCacheIterator<type> & operator= ( const QAsciiCacheIterator<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 const char * currentKey () const
25 type * operator() ()
26 type * operator++ ()
27 type * operator+= ( uint jump )
28 type * operator-- ()
29 type * operator-= ( uint jump )
30
32 The QAsciiCacheIterator class provides an iterator for QAsciiCache
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 QAsciiCache. QAsciiCache updates all iterators that refer
41 an item when that item is removed.
42
43 QAsciiCacheIterator provides an operator++() and an operator+=() to
44 traverse the cache; current() and currentKey() to access the current
45 cache item and its key. It also provides atFirst() and atLast(), which
46 return TRUE if the iterator points to the first or last item in the
47 cache respectively. The isEmpty() function returns TRUE if the cache is
48 empty; and count() returns the 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 QAsciiCache, Collection Classes, and Non-GUI Classes.
54
57 Constructs an iterator for cache. The current iterator item is set to
58 point to the first item in the cache.
59
61 ci )
62 Constructs an iterator for the same cache as ci. The new iterator
63 starts at the same item as ci.current() but moves independently from
64 there on.
65
67 Returns TRUE if the iterator points to the first item in the cache;
68 otherwise returns FALSE. Note that this refers to the iterator's
69 arbitrary ordering, not to the cache's internal least recently used
70 list.
71
72 See also toFirst() and atLast().
73
75 Returns TRUE if the iterator points to the last item in the cache;
76 otherwise returns FALSE. Note that this refers to the iterator's
77 arbitrary ordering, not to the cache's internal least recently used
78 list.
79
80 See also toLast() and atFirst().
81
83 Returns the number of items in the cache over which this iterator
84 operates.
85
86 See also isEmpty().
87
89 Returns a pointer to the current iterator item.
90
92 Returns the key for the current iterator item.
93
95 Returns TRUE if the cache is empty, i.e. count() == 0; otherwise
96 returns FALSE.
97
98 See also count().
99
101 Cast operator. Returns a pointer to the current iterator item. Same as
102 current().
103
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
112 Prefix ++ makes the iterator point to the item just after current(),
113 and makes that the new current item for the iterator. If current() was
114 the last item, operator++() returns 0.
115
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
121 Prefix -- makes the iterator point to the item just before current(),
122 and makes that the new current item for the iterator. If current() was
123 the first item, operator--() returns 0.
124
126 Returns the item jump positions before the current item, or 0 if it is
127 before the first item. Makes this the current item.
128
130 QAsciiCacheIterator<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
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
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 isEmpty().
150
151
153 http://doc.trolltech.com/qasciicacheiterator.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
162 Generated automatically from the source code.
163
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 (qasciicacheiterator.3qt) and the Qt version (3.3.8).
178
179
180
181Trolltech AS 2 February 2007 QAsciiCacheIterator(3qt)