source: trunk/doc/html/qintcacheiterator.html@ 190

Last change on this file since 190 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 9.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/qintcache.doc:281 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QIntCacheIterator Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QIntCacheIterator Class Reference</h1>
33
34<p>The QIntCacheIterator class provides an iterator for QIntCache collections.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qintcache-h.html">qintcache.h</a>&gt;</tt>
37<p><a href="qintcacheiterator-members.html">List of all member functions.</a>
38<h2>Public Members</h2>
39<ul>
40<li class=fn><a href="#QIntCacheIterator"><b>QIntCacheIterator</b></a> ( const&nbsp;QIntCache&lt;type&gt;&nbsp;&amp;&nbsp;cache )</li>
41<li class=fn><a href="#QIntCacheIterator-2"><b>QIntCacheIterator</b></a> ( const&nbsp;QIntCacheIterator&lt;type&gt;&nbsp;&amp;&nbsp;ci )</li>
42<li class=fn>QIntCacheIterator&lt;type&gt; &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QIntCacheIterator&lt;type&gt;&nbsp;&amp;&nbsp;ci )</li>
43<li class=fn>uint <a href="#count"><b>count</b></a> () const</li>
44<li class=fn>bool <a href="#isEmpty"><b>isEmpty</b></a> () const</li>
45<li class=fn>bool <a href="#atFirst"><b>atFirst</b></a> () const</li>
46<li class=fn>bool <a href="#atLast"><b>atLast</b></a> () const</li>
47<li class=fn>type * <a href="#toFirst"><b>toFirst</b></a> ()</li>
48<li class=fn>type * <a href="#toLast"><b>toLast</b></a> ()</li>
49<li class=fn><a href="#operator-type-*"><b>operator type *</b></a> () const</li>
50<li class=fn>type * <a href="#current"><b>current</b></a> () const</li>
51<li class=fn>long <a href="#currentKey"><b>currentKey</b></a> () const</li>
52<li class=fn>type * <a href="#operator()"><b>operator()</b></a> ()</li>
53<li class=fn>type * <a href="#operator++"><b>operator++</b></a> ()</li>
54<li class=fn>type * <a href="#operator+-eq"><b>operator+=</b></a> ( uint&nbsp;jump )</li>
55<li class=fn>type * <a href="#operator--"><b>operator--</b></a> ()</li>
56<li class=fn>type * <a href="#operator--eq"><b>operator-=</b></a> ( uint&nbsp;jump )</li>
57</ul>
58<hr><a name="details"></a><h2>Detailed Description</h2>
59
60
61The QIntCacheIterator class provides an iterator for <a href="qintcache.html">QIntCache</a> collections.
62<p>
63
64<p> Note that the traversal order is arbitrary; you are not guaranteed
65any particular order. If new objects are inserted into the cache
66while the iterator is active, the iterator may or may not see
67them.
68<p> Multiple iterators are completely independent, even when they
69operate on the same QIntCache. QIntCache updates all iterators
70that refer an item when that item is removed.
71<p> QIntCacheIterator provides an <a href="#operator++">operator++</a>(), and an <a href="#operator+-eq">operator+=</a>() to
72traverse the cache; <a href="#current">current</a>() and <a href="#currentKey">currentKey</a>() to access the
73current cache item and its key; <a href="#atFirst">atFirst</a>() <a href="#atLast">atLast</a>(), which return
74TRUE if the iterator points to the first/last item in the cache;
75<a href="#isEmpty">isEmpty</a>(), which returns TRUE if the cache is empty; and <a href="#count">count</a>(),
76which returns the number of items in the cache.
77<p> Note that atFirst() and atLast() refer to the iterator's arbitrary
78ordering, not to the cache's internal least recently used list.
79<p> <p>See also <a href="qintcache.html">QIntCache</a>, <a href="collection.html">Collection Classes</a>, and <a href="tools.html">Non-GUI Classes</a>.
80
81<hr><h2>Member Function Documentation</h2>
82<h3 class=fn><a name="QIntCacheIterator"></a>QIntCacheIterator::QIntCacheIterator ( const&nbsp;<a href="qintcache.html">QIntCache</a>&lt;type&gt;&nbsp;&amp;&nbsp;cache )
83</h3>
84
85<p> Constructs an iterator for <em>cache</em>. The current iterator item is
86set to point to the first item in the <em>cache</em> (or rather, the
87first item is defined to be the item at which this constructor
88sets the iterator to point).
89
90<h3 class=fn><a name="QIntCacheIterator-2"></a>QIntCacheIterator::QIntCacheIterator ( const&nbsp;<a href="qintcacheiterator.html">QIntCacheIterator</a>&lt;type&gt;&nbsp;&amp;&nbsp;ci )
91</h3>
92
93<p> Constructs an iterator for the same cache as <em>ci</em>. The new
94iterator starts at the same item as ci.<a href="#current">current</a>(), but moves
95independently from there on.
96
97<h3 class=fn>bool <a name="atFirst"></a>QIntCacheIterator::atFirst () const
98</h3>
99
100<p> Returns TRUE if the iterator points to the first item in the
101cache; otherwise returns FALSE. Note that this refers to the
102iterator's arbitrary ordering, not to the cache's internal least
103recently used list.
104<p> <p>See also <a href="#toFirst">toFirst</a>() and <a href="#atLast">atLast</a>().
105
106<h3 class=fn>bool <a name="atLast"></a>QIntCacheIterator::atLast () const
107</h3>
108
109<p> Returns TRUE if the iterator points to the last item in the cache;
110otherwise returns FALSE. Note that this refers to the iterator's
111arbitrary ordering, not to the cache's internal least recently
112used list.
113<p> <p>See also <a href="#toLast">toLast</a>() and <a href="#atFirst">atFirst</a>().
114
115<h3 class=fn>uint <a name="count"></a>QIntCacheIterator::count () const
116</h3>
117
118<p> Returns the number of items in the cache on which this iterator
119operates.
120<p> <p>See also <a href="#isEmpty">isEmpty</a>().
121
122<h3 class=fn>type * <a name="current"></a>QIntCacheIterator::current () const
123</h3>
124
125<p> Returns a pointer to the current iterator item.
126
127<h3 class=fn>long <a name="currentKey"></a>QIntCacheIterator::currentKey () const
128</h3>
129
130<p> Returns the key for the current iterator item.
131
132<h3 class=fn>bool <a name="isEmpty"></a>QIntCacheIterator::isEmpty () const
133</h3>
134
135<p> Returns TRUE if the cache is empty; otherwise returns FALSE.
136<p> <p>See also <a href="#count">count</a>().
137
138<h3 class=fn><a name="operator-type-*"></a>QIntCacheIterator::operator type * () const
139</h3>
140
141<p> Cast operator. Returns a pointer to the current iterator item.
142Same as <a href="#current">current</a>().
143
144<h3 class=fn>type * <a name="operator()"></a>QIntCacheIterator::operator() ()
145</h3>
146
147<p> Makes the succeeding item current and returns the original current
148item.
149<p> If the current iterator item was the last item in the cache or if
150it was 0, 0 is returned.
151
152<h3 class=fn>type * <a name="operator++"></a>QIntCacheIterator::operator++ ()
153</h3>
154
155<p> Prefix ++ makes the iterator point to the item just after
156<a href="#current">current</a>(), and makes it the new current item for the iterator. If
157current() was the last item, <a href="#operator--">operator--</a>() returns 0.
158
159<h3 class=fn>type * <a name="operator+-eq"></a>QIntCacheIterator::operator+= ( uint&nbsp;jump )
160</h3>
161
162<p> Returns the item <em>jump</em> positions after the current item, or 0 if
163it is beyond the last item. Makes this the current item.
164
165<h3 class=fn>type * <a name="operator--"></a>QIntCacheIterator::operator-- ()
166</h3>
167
168<p> Prefix -- makes the iterator point to the item just before
169<a href="#current">current</a>(), and makes it the new current item for the iterator. If
170current() was the first item, <a href="#operator--">operator--</a>() returns 0.
171
172<h3 class=fn>type * <a name="operator--eq"></a>QIntCacheIterator::operator-= ( uint&nbsp;jump )
173</h3>
174
175<p> Returns the item <em>jump</em> positions before the current item, or 0
176if it is beyond the first item. Makes this the current item.
177
178<h3 class=fn><a href="qintcacheiterator.html">QIntCacheIterator</a>&lt;type&gt;&nbsp;&amp; <a name="operator-eq"></a>QIntCacheIterator::operator= ( const&nbsp;<a href="qintcacheiterator.html">QIntCacheIterator</a>&lt;type&gt;&nbsp;&amp;&nbsp;ci )
179</h3>
180
181<p> Makes this an iterator for the same cache as <em>ci</em>. The new
182iterator starts at the same item as ci.<a href="#current">current</a>(), but moves
183independently thereafter.
184
185<h3 class=fn>type * <a name="toFirst"></a>QIntCacheIterator::toFirst ()
186</h3>
187
188<p> Sets the iterator to point to the first item in the cache and
189returns a pointer to the item.
190<p> Sets the iterator to 0, and returns 0, if the cache is empty.
191<p> <p>See also <a href="#toLast">toLast</a>() and <a href="#isEmpty">isEmpty</a>().
192
193<h3 class=fn>type * <a name="toLast"></a>QIntCacheIterator::toLast ()
194</h3>
195
196<p> Sets the iterator to point to the last item in the cache and
197returns a pointer to the item.
198<p> Sets the iterator to 0, and returns 0, if the cache is empty.
199<p> <p>See also <a href="#toFirst">toFirst</a>() and <a href="#isEmpty">isEmpty</a>().
200
201<!-- eof -->
202<hr><p>
203This file is part of the <a href="index.html">Qt toolkit</a>.
204Copyright &copy; 1995-2007
205<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
206<table width=100% cellspacing=0 border=0><tr>
207<td>Copyright &copy; 2007
208<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
209<td align=right><div align=right>Qt 3.3.8</div>
210</table></div></address></body>
211</html>
Note: See TracBrowser for help on using the repository browser.