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

« back to all changes in this revision

Viewing changes to doc/html/qlinkedlist-qt3.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/corelib/tools/qlinkedlist.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Qt 3 Support Members for QLinkedList</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Qt 3 Support Members for QLinkedList</h1>
 
21
<p><b>The following class members are part of the Qt 3 support layer.</b> They are provided to help you port old code to Qt 4. We advise against using them in new code.</p>
 
22
<p><ul><li><a href="qlinkedlist.html">QLinkedList class reference</a></li></ul></p>
 
23
<h3>Public Functions</h3>
 
24
<ul>
 
25
<li><div class="fn"/>iterator <b><a href="qlinkedlist-qt3.html#find">find</a></b> ( iterator <i>from</i>, const T &amp; <i>t</i> )</li>
 
26
<li><div class="fn"/>iterator <b><a href="qlinkedlist-qt3.html#find-2">find</a></b> ( const T &amp; <i>t</i> )</li>
 
27
<li><div class="fn"/>const_iterator <b><a href="qlinkedlist-qt3.html#find-3">find</a></b> ( const_iterator <i>from</i>, const T &amp; <i>t</i> ) const</li>
 
28
<li><div class="fn"/>const_iterator <b><a href="qlinkedlist-qt3.html#find-4">find</a></b> ( const T &amp; <i>t</i> ) const</li>
 
29
<li><div class="fn"/>int <b><a href="qlinkedlist-qt3.html#findIndex">findIndex</a></b> ( const T &amp; <i>t</i> ) const</li>
 
30
<li><div class="fn"/>iterator <b><a href="qlinkedlist-qt3.html#remove">remove</a></b> ( iterator <i>pos</i> )</li>
 
31
</ul>
 
32
<hr />
 
33
<h2>Member Function Documentation</h2>
 
34
<h3 class="fn"><a name="find"></a><a href="qlinkedlist-iterator.html">iterator</a> QLinkedList::find ( <a href="qlinkedlist-iterator.html">iterator</a> <i>from</i>, const T &amp; <i>t</i> )</h3>
 
35
<p>If you need random access to a data structure then <a href="qlist.html">QList</a>, <a href="qvector.html">QVector</a>, <a href="qmap.html">QMap</a>, or <a href="qhash.html">QHash</a>, are all better choices than <a href="qlinkedlist.html">QLinkedList</a>.</p>
 
36
<p>For example, if you have code like</p>
 
37
<pre><font color="#404040">    QLinkedList::iterator i = list-&gt;find(from, value);</font></pre>
 
38
<p>you can rewrite it as</p>
 
39
<pre>    QLinkedList::iterator i = from;
 
40
    while (i != list-&gt;end() &amp;&amp; *i != value)
 
41
        ++i;</pre>
 
42
<h3 class="fn"><a name="find-2"></a><a href="qlinkedlist-iterator.html">iterator</a> QLinkedList::find ( const T &amp; <i>t</i> )</h3>
 
43
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
44
<p>If you need random access to a data structure then <a href="qlist.html">QList</a>, <a href="qvector.html">QVector</a>, <a href="qmap.html">QMap</a>, or <a href="qhash.html">QHash</a>, are all better choices than <a href="qlinkedlist.html">QLinkedList</a>.</p>
 
45
<p>For example, if you have code like</p>
 
46
<pre><font color="#404040">    QLinkedList::iterator i = list-&gt;find(value);</font></pre>
 
47
<p>you can rewrite it as</p>
 
48
<pre>    QLinkedList::iterator i = list-&gt;begin();
 
49
    while (i != list-&gt;end() &amp;&amp; *i != value)
 
50
        ++i;</pre>
 
51
<h3 class="fn"><a name="find-3"></a><a href="qlinkedlist-const-iterator.html">const_iterator</a> QLinkedList::find ( <a href="qlinkedlist-const-iterator.html">const_iterator</a> <i>from</i>, const T &amp; <i>t</i> ) const</h3>
 
52
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
53
<p>If you need random access to a data structure then <a href="qlist.html">QList</a>, <a href="qvector.html">QVector</a>, <a href="qmap.html">QMap</a>, or <a href="qhash.html">QHash</a>, are all better choices than <a href="qlinkedlist.html">QLinkedList</a>.</p>
 
54
<p>For example, if you have code like</p>
 
55
<pre><font color="#404040">    QLinkedList::const_iterator i = list-&gt;find(from, value);</font></pre>
 
56
<p>you can rewrite it as</p>
 
57
<pre>    QLinkedList::const_iterator i = from;
 
58
    while (i != list-&gt;end() &amp;&amp; *i != value)
 
59
        ++i;</pre>
 
60
<h3 class="fn"><a name="find-4"></a><a href="qlinkedlist-const-iterator.html">const_iterator</a> QLinkedList::find ( const T &amp; <i>t</i> ) const</h3>
 
61
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
62
<p>If you need random access to a data structure then <a href="qlist.html">QList</a>, <a href="qvector.html">QVector</a>, <a href="qmap.html">QMap</a>, or <a href="qhash.html">QHash</a>, are all better choices than <a href="qlinkedlist.html">QLinkedList</a>.</p>
 
63
<p>For example, if you have code like</p>
 
64
<pre><font color="#404040">    QLinkedList::const_iterator i = list-&gt;find(value);</font></pre>
 
65
<p>you can rewrite it as</p>
 
66
<pre>    QLinkedList::const_iterator i = list-&gt;begin();
 
67
    while (i != list-&gt;end() &amp;&amp; *i != value)
 
68
        ++i;</pre>
 
69
<h3 class="fn"><a name="findIndex"></a>int QLinkedList::findIndex ( const T &amp; <i>t</i> ) const</h3>
 
70
<p>If you need indexes then <a href="qlist.html">QList</a> or <a href="qvector.html">QVector</a> are better choices than <a href="qlinkedlist.html">QLinkedList</a>.</p>
 
71
<p>For example, if you have code like</p>
 
72
<pre><font color="#404040">    int index = list-&gt;findIndex(value);</font></pre>
 
73
<p>you can rewrite it as</p>
 
74
<pre>    int index = 0;
 
75
    bool found = false;
 
76
    for (const_iterator i = list-&gt;begin(); i != list-&gt;end(); ++i; ++index)
 
77
        if (*i == value) {
 
78
            found = true;
 
79
            break;
 
80
        }
 
81
    if (!found)
 
82
        index = -1;</pre>
 
83
<h3 class="fn"><a name="remove"></a><a href="qlinkedlist-iterator.html">iterator</a> QLinkedList::remove ( <a href="qlinkedlist-iterator.html">iterator</a> <i>pos</i> )</h3>
 
84
<p>Use <a href="qlinkedlist.html#erase">erase</a>() instead.</p>
 
85
<p /><address><hr /><div align="center">
 
86
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
87
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
88
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
89
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
90
</tr></table></div></address></body>
 
91
</html>