~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qset-iterator.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/doc/src/qset.qdoc -->
 
5
<!-- qset.qdoc -->
6
6
<head>
7
 
  <title>Qt 4.5: iterator Class Reference</title>
 
7
  <title>Qt 4.6: iterator Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl/QSet/iterator" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">iterator Class Reference<br /><span class="small-subtitle">(QSet::iterator)<br />[<a href="qtcore.html">QtCore</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">iterator Class Reference<br /><span class="small-subtitle">(QSet::iterator)<br />[<a href="qtcore.html">QtCore</a> module]</span>
16
17
</h1>
17
18
<p>The QSet::iterator class provides an STL-style non-const iterator for <a href="qset.html">QSet</a>. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;<a href="qset.html">QSet</a>&gt;</pre><p>This class was introduced in Qt 4.2.</p>
19
20
<ul>
20
21
<li><a href="qset-iterator-members.html">List of all members, including inherited members</a></li>
21
22
</ul>
 
23
<hr />
22
24
<a name="public-types"></a>
23
 
<h3>Public Types</h3>
24
 
<ul>
25
 
<li><div class="fn"></div>typedef <b><a href="qset-iterator.html#iterator_category-typedef">iterator_category</a></b></li>
26
 
</ul>
 
25
<h2>Public Types</h2>
 
26
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
27
<tr><td class="memItemLeft" align="right" valign="top">typedef </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#iterator_category-typedef">iterator_category</a></b></td></tr>
 
28
</table>
 
29
<hr />
27
30
<a name="public-functions"></a>
28
 
<h3>Public Functions</h3>
29
 
<ul>
30
 
<li><div class="fn"></div><b><a href="qset-iterator.html#iterator">iterator</a></b> ()</li>
31
 
<li><div class="fn"></div><b><a href="qset-iterator.html#iterator-3">iterator</a></b> ( const iterator &amp; <i>other</i> )</li>
32
 
<li><div class="fn"></div>bool <b><a href="qset-iterator.html#operator-not-eq">operator!=</a></b> ( const iterator &amp; <i>other</i> ) const</li>
33
 
<li><div class="fn"></div>bool <b><a href="qset-iterator.html#operator-not-eq-2">operator!=</a></b> ( const const_iterator &amp; <i>other</i> ) const</li>
34
 
<li><div class="fn"></div>const T &amp; <b><a href="qset-iterator.html#operator-2a">operator*</a></b> () const</li>
35
 
<li><div class="fn"></div>iterator <b><a href="qset-iterator.html#operator-2b">operator+</a></b> ( int <i>j</i> ) const</li>
36
 
<li><div class="fn"></div>iterator &amp; <b><a href="qset-iterator.html#operator-2b-2b">operator++</a></b> ()</li>
37
 
<li><div class="fn"></div>iterator <b><a href="qset-iterator.html#operator-2b-2b-2">operator++</a></b> ( int )</li>
38
 
<li><div class="fn"></div>iterator &amp; <b><a href="qset-iterator.html#operator-2b-eq">operator+=</a></b> ( int <i>j</i> )</li>
39
 
<li><div class="fn"></div>iterator <b><a href="qset-iterator.html#operator-">operator-</a></b> ( int <i>j</i> ) const</li>
40
 
<li><div class="fn"></div>iterator &amp; <b><a href="qset-iterator.html#operator--">operator--</a></b> ()</li>
41
 
<li><div class="fn"></div>iterator <b><a href="qset-iterator.html#operator---2">operator--</a></b> ( int )</li>
42
 
<li><div class="fn"></div>iterator &amp; <b><a href="qset-iterator.html#operator--eq">operator-=</a></b> ( int <i>j</i> )</li>
43
 
<li><div class="fn"></div>const T * <b><a href="qset-iterator.html#operator--gt">operator-&gt;</a></b> () const</li>
44
 
<li><div class="fn"></div>iterator &amp; <b><a href="qset-iterator.html#operator-eq">operator=</a></b> ( const iterator &amp; <i>other</i> )</li>
45
 
<li><div class="fn"></div>bool <b><a href="qset-iterator.html#operator-eq-eq">operator==</a></b> ( const iterator &amp; <i>other</i> ) const</li>
46
 
<li><div class="fn"></div>bool <b><a href="qset-iterator.html#operator-eq-eq-2">operator==</a></b> ( const const_iterator &amp; <i>other</i> ) const</li>
47
 
</ul>
 
31
<h2>Public Functions</h2>
 
32
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
33
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#iterator">iterator</a></b> ()</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#iterator-3">iterator</a></b> ( const iterator &amp; <i>other</i> )</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-not-eq">operator!=</a></b> ( const iterator &amp; <i>other</i> ) const</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-not-eq-2">operator!=</a></b> ( const const_iterator &amp; <i>other</i> ) const</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">const T &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-2a">operator*</a></b> () const</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-2b">operator+</a></b> ( int <i>j</i> ) const</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">iterator &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-2b-2b">operator++</a></b> ()</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-2b-2b-2">operator++</a></b> ( int )</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">iterator &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-2b-eq">operator+=</a></b> ( int <i>j</i> )</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-">operator-</a></b> ( int <i>j</i> ) const</td></tr>
 
43
<tr><td class="memItemLeft" align="right" valign="top">iterator &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator--">operator--</a></b> ()</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator---2">operator--</a></b> ( int )</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">iterator &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator--eq">operator-=</a></b> ( int <i>j</i> )</td></tr>
 
46
<tr><td class="memItemLeft" align="right" valign="top">const T * </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator--gt">operator-&gt;</a></b> () const</td></tr>
 
47
<tr><td class="memItemLeft" align="right" valign="top">iterator &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-eq">operator=</a></b> ( const iterator &amp; <i>other</i> )</td></tr>
 
48
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-eq-eq">operator==</a></b> ( const iterator &amp; <i>other</i> ) const</td></tr>
 
49
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qset-iterator.html#operator-eq-eq-2">operator==</a></b> ( const const_iterator &amp; <i>other</i> ) const</td></tr>
 
50
</table>
48
51
<a name="details"></a>
49
52
<hr />
50
53
<h2>Detailed Description</h2>
81
84
<p>See also <a href="qset-const-iterator.html">QSet::const_iterator</a> and <a href="qmutablesetiterator.html">QMutableSetIterator</a>.</p>
82
85
<hr />
83
86
<h2>Member Type Documentation</h2>
 
87
<a name="//apple_ref/cpp/tdef/QSet::iterator/iterator_category" />
84
88
<h3 class="fn"><a name="iterator_category-typedef"></a>typedef iterator::iterator_category</h3>
85
89
<p>Synonyms for <i>std::bidirectional_iterator_tag</i> indicating these iterators are bidirectional iterators.</p>
86
90
<hr />
87
91
<h2>Member Function Documentation</h2>
 
92
<a name="//apple_ref/cpp/instm/QSet::iterator/iterator" />
88
93
<h3 class="fn"><a name="iterator"></a>iterator::iterator ()</h3>
89
94
<p>Constructs an uninitialized iterator.</p>
90
95
<p>Functions like operator*() and operator++() should not be called on an uninitialized iterator. Use operator=() to assign a value to it before using it.</p>
91
96
<p>See also <a href="qset.html#begin">QSet::begin</a>() and <a href="qset.html#end">QSet::end</a>().</p>
92
97
<h3 class="fn"><a name="iterator-3"></a>iterator::iterator ( const iterator &amp; <i>other</i> )</h3>
93
98
<p>Constructs a copy of <i>other</i>.</p>
 
99
<a name="//apple_ref/cpp/instm/QSet::iterator/operator!=" />
94
100
<h3 class="fn"><a name="operator-not-eq"></a>bool iterator::operator!= ( const iterator &amp; <i>other</i> ) const</h3>
95
101
<p>Returns true if <i>other</i> points to a different item than this iterator; otherwise returns false.</p>
96
102
<p>See also <a href="qset-iterator.html#operator-eq-eq">operator==</a>().</p>
97
103
<h3 class="fn"><a name="operator-not-eq-2"></a>bool iterator::operator!= ( const <a href="qset-const-iterator.html">const_iterator</a> &amp; <i>other</i> ) const</h3>
98
104
<p>This is an overloaded function.</p>
 
105
<a name="//apple_ref/cpp/instm/QSet::iterator/operator*" />
99
106
<h3 class="fn"><a name="operator-2a"></a>const T &amp; iterator::operator* () const</h3>
100
107
<p>Returns a reference to the current item.</p>
101
108
<p>See also <a href="qset-iterator.html#operator--gt">operator-&gt;</a>().</p>
 
109
<a name="//apple_ref/cpp/instm/QSet::iterator/operator+" />
102
110
<h3 class="fn"><a name="operator-2b"></a>iterator iterator::operator+ ( int <i>j</i> ) const</h3>
103
111
<p>Returns an iterator to the item at <i>j</i> positions forward from this iterator. (If <i>j</i> is negative, the iterator goes backward.)</p>
104
112
<p>This operation can be slow for large <i>j</i> values.</p>
105
113
<p>See also <a href="qset-iterator.html#operator-">operator-</a>().</p>
 
114
<a name="//apple_ref/cpp/instm/QSet::iterator/operator++" />
106
115
<h3 class="fn"><a name="operator-2b-2b"></a>iterator &amp; iterator::operator++ ()</h3>
107
116
<p>The prefix ++ operator (<tt>++it</tt>) advances the iterator to the next item in the set and returns an iterator to the new current item.</p>
108
117
<p>Calling this function on <a href="qset.html#constEnd">QSet::constEnd</a>() leads to undefined results.</p>
110
119
<h3 class="fn"><a name="operator-2b-2b-2"></a>iterator iterator::operator++ ( int )</h3>
111
120
<p>This is an overloaded function.</p>
112
121
<p>The postfix ++ operator (<tt>it++</tt>) advances the iterator to the next item in the set and returns an iterator to the previously current item.</p>
 
122
<a name="//apple_ref/cpp/instm/QSet::iterator/operator+=" />
113
123
<h3 class="fn"><a name="operator-2b-eq"></a>iterator &amp; iterator::operator+= ( int <i>j</i> )</h3>
114
124
<p>Advances the iterator by <i>j</i> items. (If <i>j</i> is negative, the iterator goes backward.)</p>
115
125
<p>This operation can be slow for large <i>j</i> values.</p>
116
126
<p>See also <a href="qset-iterator.html#operator--eq">operator-=</a>() and <a href="qset-iterator.html#operator-2b">operator+</a>().</p>
 
127
<a name="//apple_ref/cpp/instm/QSet::iterator/operator-" />
117
128
<h3 class="fn"><a name="operator-"></a>iterator iterator::operator- ( int <i>j</i> ) const</h3>
118
129
<p>Returns an iterator to the item at <i>j</i> positions backward from this iterator. (If <i>j</i> is negative, the iterator goes forward.)</p>
119
130
<p>This operation can be slow for large <i>j</i> values.</p>
120
131
<p>See also <a href="qset-iterator.html#operator-2b">operator+</a>().</p>
 
132
<a name="//apple_ref/cpp/instm/QSet::iterator/operator--" />
121
133
<h3 class="fn"><a name="operator--"></a>iterator &amp; iterator::operator-- ()</h3>
122
134
<p>The prefix -- operator (<tt>--it</tt>) makes the preceding item current and returns an iterator to the new current item.</p>
123
135
<p>Calling this function on <a href="qset.html#begin">QSet::begin</a>() leads to undefined results.</p>
125
137
<h3 class="fn"><a name="operator---2"></a>iterator iterator::operator-- ( int )</h3>
126
138
<p>This is an overloaded function.</p>
127
139
<p>The postfix -- operator (<tt>it--</tt>) makes the preceding item current and returns an iterator to the previously current item.</p>
 
140
<a name="//apple_ref/cpp/instm/QSet::iterator/operator-=" />
128
141
<h3 class="fn"><a name="operator--eq"></a>iterator &amp; iterator::operator-= ( int <i>j</i> )</h3>
129
142
<p>Makes the iterator go back by <i>j</i> items. (If <i>j</i> is negative, the iterator goes forward.)</p>
130
143
<p>This operation can be slow for large <i>j</i> values.</p>
131
144
<p>See also <a href="qset-iterator.html#operator-2b-eq">operator+=</a>() and <a href="qset-iterator.html#operator-">operator-</a>().</p>
 
145
<a name="//apple_ref/cpp/instm/QSet::iterator/operator->" />
132
146
<h3 class="fn"><a name="operator--gt"></a>const T * iterator::operator-&gt; () const</h3>
133
147
<p>Returns a pointer to the current item.</p>
134
148
<p>See also <a href="qset-iterator.html#operator-2a">operator*</a>().</p>
 
149
<a name="//apple_ref/cpp/instm/QSet::iterator/operator=" />
135
150
<h3 class="fn"><a name="operator-eq"></a>iterator &amp; iterator::operator= ( const iterator &amp; <i>other</i> )</h3>
136
151
<p>Assigns <i>other</i> to this iterator.</p>
 
152
<a name="//apple_ref/cpp/instm/QSet::iterator/operator==" />
137
153
<h3 class="fn"><a name="operator-eq-eq"></a>bool iterator::operator== ( const iterator &amp; <i>other</i> ) const</h3>
138
154
<p>Returns true if <i>other</i> points to the same item as this iterator; otherwise returns false.</p>
139
155
<p>See also <a href="qset-iterator.html#operator-not-eq">operator!=</a>().</p>
141
157
<p>This is an overloaded function.</p>
142
158
<p /><address><hr /><div align="center">
143
159
<table width="100%" cellspacing="0" border="0"><tr class="address">
144
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
145
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
146
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
147
 
</tr></table></div></address></body>
 
160
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
161
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
162
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
163
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
148
164
</html>