File: qasciicacheiterator.html

package info (click to toggle)
qt-embedded 2.3.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 68,608 kB
  • ctags: 45,998
  • sloc: cpp: 276,654; ansic: 71,987; makefile: 29,074; sh: 12,305; yacc: 2,465; python: 1,863; perl: 481; lex: 480; xml: 68; lisp: 15
file content (150 lines) | stat: -rw-r--r-- 9,713 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QAsciiCacheIterator Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">

<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>

<h1 align=center>QAsciiCacheIterator Class Reference</h1><br clear="all">
<p>
The QAsciiCacheIterator class provides an iterator for <a href="qasciicache.html">QAsciiCache</a> collections.
<a href="#details">More...</a>
<p>
<code>#include &lt;<a href="qasciicache-h.html">qasciicache.h</a>&gt;</code>
<p>
Inherits <a href="qgcacheiterator.html">QGCacheIterator</a>.
<p><a href="qasciicacheiterator-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn"><a href="#a503f5"><b>QAsciiCacheIterator</b></a>(constQAsciiCache&lt;type&gt;&amp;cache)</div>
<li><div class="fn"><a href="#3e10d2"><b>QAsciiCacheIterator</b></a>(constQAsciiCacheIterator&lt;type&gt;&amp;ci)</div>
<li><div class="fn">QAsciiCacheIterator&lt;type&gt;&amp;<a href="#6e0d5f"><b>operator=</b></a>(constQAsciiCacheIterator&lt;type&gt;&amp;ci)</div>
<li><div class="fn">uint<a href="#8f14bf"><b>count</b></a>()const</div>
<li><div class="fn">bool<a href="#ff8e85"><b>isEmpty</b></a>()const</div>
<li><div class="fn">bool<a href="#c0cc66"><b>atFirst</b></a>()const</div>
<li><div class="fn">bool<a href="#a207da"><b>atLast</b></a>()const</div>
<li><div class="fn">type*<a href="#26fac3"><b>toFirst</b></a>()</div>
<li><div class="fn">type*<a href="#695145"><b>toLast</b></a>()</div>
<li><div class="fn">operator<a href=qasciicacheiterator.html#75a847><b>type*</b></a>()const</div>
<li><div class="fn">type*<a href="#55b207"><b>current</b></a>()const</div>
<li><div class="fn">constchar*<a href="#e5ba52"><b>currentKey</b></a>()const</div>
<li><div class="fn">type*<a href="#d14b59"><b>operator</b></a>()</div>
<li><div class="fn">type*<a href="#443725"><b>operator++</b></a>()</div>
<li><div class="fn">type*<a href="#6876f1"><b>operator+=</b></a>(uintjump)</div>
<li><div class="fn">type*<a href="#22e450"><b>operator--</b></a>()</div>
<li><div class="fn">type*<a href="#84d8dc"><b>operator-=</b></a>(uintjump)</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QAsciiCacheIterator class provides an iterator for <a href="qasciicache.html">QAsciiCache</a> collections.
<p>
Note that the traversal order is arbitrary, you are not guaranteed
any particular order.  If new objects are inserted into the cache
while the iterator is active, the iterator may or may not see them.
<p>Multiple iterators are completely independent, even when they
operate on the same QAsciiCache. QAsciiCache updates all iterators that refer
an item when that item is removed.
<p>QAsciiCacheIterator provides an <a href="#443725">operator++</a>(), and an <a href="#6876f1">operator+=</a>() to
traverse the cache, <a href="#55b207">current</a>() and <a href="#e5ba52">currentKey</a>() to access the current
cache item and its key, <a href="#c0cc66">atFirst</a>() <a href="#a207da">atLast</a>() which return TRUE if the
iterator points to the first/last item in the cache, <a href="#ff8e85">isEmpty</a>() which
returns TRUE if the cache is empty and finally <a href="#8f14bf">count</a>() which returns
the number of items in the cache.
<p>Note that atFirst() and atLast() refer to the iterator's arbitrary
ordering, not to the cache's internal LRU list.
<p>See also  <a href="qasciicache.html">QAsciiCache</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="a503f5"></a>QAsciiCacheIterator::QAsciiCacheIterator(const<a href="qasciicache.html">QAsciiCache</a>&lt;type&gt;&amp;cache)</h3>
<p>Constructs an iterator for <em>cache.</em>  The current iterator item is
set to point on the first item in the <em>cache</em> (or rather, the first
item is defined to be the item at which this constructor sets the
iterator to point).
<h3 class="fn"><a name="3e10d2"></a>QAsciiCacheIterator::QAsciiCacheIterator(constQAsciiCacheIterator&lt;type&gt;&amp;ci)</h3>
<p>Constructs an iterator for the same cache as <em>ci.</em>  The new
iterator starts at the same item as ci.<a href="#55b207">current</a>(), but moves
independently from there on.
<h3 class="fn"><a name="75a847"></a>QAsciiCacheIterator::operatortype*()const</h3>
<p>Cast operator. Returns a pointer to the current iterator item.
Same as <a href="#55b207">current</a>().
<h3 class="fn">bool<a name="c0cc66"></a>QAsciiCacheIterator::atFirst()const</h3>
<p>Returns TRUE if the iterator points to the first item in the
cache. Note that this refers to the iterator's arbitrary ordering,
not to the cache's internal LRU list.
<p>See also  <a href="#26fac3">toFirst</a>() and <a href="#a207da">atLast</a>().
<h3 class="fn">bool<a name="a207da"></a>QAsciiCacheIterator::atLast()const</h3>
<p>Returns TRUE if the iterator points to the last item in the
cache. Note that this refers to the iterator's arbitrary ordering,
not to the cache's internal LRU list.
<p>See also  <a href="#695145">toLast</a>() and <a href="#c0cc66">atFirst</a>().
<h3 class="fn">uint<a name="8f14bf"></a>QAsciiCacheIterator::count()const</h3>
<p>Returns the number of items in the cache on which this iterator operates.
<p>See also  <a href="#ff8e85">isEmpty</a>().
<h3 class="fn">type*<a name="55b207"></a>QAsciiCacheIterator::current()const</h3>
<p>Returns a pointer to the current iterator item.
<h3 class="fn">constchar*<a name="e5ba52"></a>QAsciiCacheIterator::currentKey()const</h3>
<p>Returns the key for the current iterator item.
<h3 class="fn">bool<a name="ff8e85"></a>QAsciiCacheIterator::isEmpty()const</h3>
<p>Returns TRUE if the cache is empty, i.e. <a href="#8f14bf">count</a>() == 0, otherwise
FALSE.
<p>See also  <a href="#8f14bf">count</a>().
<h3 class="fn">type*<a name="d14b59"></a>QAsciiCacheIterator::operator()()</h3>
<p>Makes the succeeding item current and returns the original current
item.
<p>If the current iterator item was the last item in the cache or if it
was null, null is returned.
<h3 class="fn">type*<a name="443725"></a>QAsciiCacheIterator::operator++()</h3>
<p>Prefix ++ makes the iterator point to the item just after <em><a href="#55b207">current</a>(),</em> and makes that the new current item for the iterator.  If
current() was the last item, <a href="#22e450">operator--</a>() returns 0.
<h3 class="fn">type*<a name="6876f1"></a>QAsciiCacheIterator::operator+=(uintjump)</h3>
<p>Returns the item <em>jump</em> positions after the current item, or null if
it is beyond the last item.  Makes this the current item.
<h3 class="fn">type*<a name="22e450"></a>QAsciiCacheIterator::operator--()</h3>
<p>Prefix -- makes the iterator point to the item just before <em><a href="#55b207">current</a>(),</em> and makes that the new current item for the iterator.  If
current() was the first item, operator--() returns 0.
<h3 class="fn">type*<a name="84d8dc"></a>QAsciiCacheIterator::operator-=(uintjump)</h3>
<p>Returns the item <em>jump</em> positions before the current item, or null if
it is beyond the first item.  Makes this the current item.
<h3 class="fn">QAsciiCacheIterator&lt;type&gt;&amp;<a name="6e0d5f"></a>QAsciiCacheIterator::operator=(constQAsciiCacheIterator&lt;type&gt;&amp;ci)</h3>
<p>Makes this an iterator for the same cache as <em>ci.</em>  The new
iterator starts at the same item as ci.<a href="#55b207">current</a>(), but moves
independently thereafter.
<h3 class="fn">type*<a name="26fac3"></a>QAsciiCacheIterator::toFirst()</h3>
<p>Sets the iterator to point to the first item in the cache and
returns a pointer to the item.
<p>Sets the iterator to null and returns null if if the cache is empty.
<p>See also  <a href="#695145">toLast</a>() and <a href="#ff8e85">isEmpty</a>().
<h3 class="fn">type*<a name="695145"></a>QAsciiCacheIterator::toLast()</h3>
<p>Sets the iterator to point to the last item in the cache and
returns a pointer to the item.
<p>Sets the iterator to null and returns null if if the cache is empty.
<p>See also  toLast() and <a href="#ff8e85">isEmpty</a>().
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright &copy; 1995-2001
<a href="http://www.trolltech.com">Trolltech</a>, all rights reserved.<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>