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

« back to all changes in this revision

Viewing changes to doc/html/q3strlist.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/doc/src/q3ptrlist.qdoc -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3StrList Class Reference</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">Q3StrList Class Reference</h1>
 
21
<p>The Q3StrList class provides a doubly-linked list of char*. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3StrList&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="q3ptrlist.html">Q3PtrList&lt;char&gt;</a>.</p>
 
25
<p>Inherited by <a href="q3strilist.html">Q3StrIList</a>.</p>
 
26
<ul>
 
27
<li><a href="q3strlist-members.html">List of all members, including inherited members</a></li>
 
28
</ul>
 
29
<a name="public-functions"></a>
 
30
<h3>Public Functions</h3>
 
31
<ul>
 
32
<li><div class="fn"/><b><a href="q3strlist.html#Q3StrList">Q3StrList</a></b> ( bool <i>deepCopies</i> = true )</li>
 
33
<li><div class="fn"/><b><a href="q3strlist.html#Q3StrList-2">Q3StrList</a></b> ( const Q3StrList &amp; <i>list</i> )</li>
 
34
<li><div class="fn"/><b><a href="q3strlist.html#Q3StrList-3">Q3StrList</a></b> ( const QList&lt;QByteArray&gt; &amp; <i>list</i> )</li>
 
35
<li><div class="fn"/><b><a href="q3strlist.html#dtor.Q3StrList">~Q3StrList</a></b> ()</li>
 
36
<li><div class="fn"/><b><a href="q3strlist.html#operator-QList-ltQByteArray-gt">operator QList&lt;QByteArray&gt;</a></b> () const</li>
 
37
<li><div class="fn"/>Q3StrList &amp; <b><a href="q3strlist.html#operator-eq">operator=</a></b> ( const Q3StrList &amp; <i>list</i> )</li>
 
38
<li><div class="fn"/>Q3StrList &amp; <b><a href="q3strlist.html#operator-eq-2">operator=</a></b> ( const QList&lt;QByteArray&gt; &amp; <i>list</i> )</li>
 
39
</ul>
 
40
<ul>
 
41
<li><div class="fn"/>39 public functions inherited from <a href="q3ptrlist.html#public-functions">Q3PtrList</a></li>
 
42
<li><div class="fn"/>4 public functions inherited from <a href="q3ptrcollection.html#public-functions">Q3PtrCollection</a></li>
 
43
</ul>
 
44
<h3>Additional Inherited Members</h3>
 
45
<ul>
 
46
<li><div class="fn"/>3 protected functions inherited from <a href="q3ptrlist.html#protected-functions">Q3PtrList</a></li>
 
47
<li><div class="fn"/>2 protected functions inherited from <a href="q3ptrcollection.html#protected-functions">Q3PtrCollection</a></li>
 
48
</ul>
 
49
<a name="details"></a>
 
50
<hr />
 
51
<h2>Detailed Description</h2>
 
52
<p>The Q3StrList class provides a doubly-linked list of char*.</p>
 
53
<p>If you want a string list of <a href="qstring.html">QString</a>s use <a href="qstringlist.html">QStringList</a>.</p>
 
54
<p>This class is a <a href="q3ptrlist.html">Q3PtrList</a>&lt;char&gt; instance (a list of char*).</p>
 
55
<p>Q3StrList can make deep or shallow copies of the strings that are inserted.</p>
 
56
<p>A deep copy means that memory is allocated for the string and then the string data is copied into that memory. A shallow copy is just a copy of the pointer value and not of the string data itself.</p>
 
57
<p>The disadvantage of shallow copies is that because a pointer can be deleted only once, the program must put all strings in a central place and know when it is safe to delete them (i.e. when the strings are no longer referenced by other parts of the program). This can make the program more complex. The advantage of shallow copies is that they consume far less memory than deep copies. It is also much faster to copy a pointer (typically 4 or 8 bytes) than to copy string data.</p>
 
58
<p>A Q3StrList that operates on deep copies will, by default, turn on auto-deletion (see <a href="q3ptrcollection.html#setAutoDelete">setAutoDelete</a>()). Thus, by default Q3StrList will deallocate any string copies it allocates.</p>
 
59
<p>The virtual <a href="q3strlist.html#compareItems">compareItems</a>() function is reimplemented and does a case-sensitive string comparison. The <a href="q3ptrlist.html#inSort">inSort</a>() function will insert strings in sorted order. In general it is fastest to insert the strings as they come and <a href="q3ptrlist.html#sort">sort</a>() at the end; <a href="q3ptrlist.html#inSort">inSort</a>() is useful when you just have to add a few extra strings to an already sorted list.</p>
 
60
<p>The <a href="q3strlistiterator.html">Q3StrListIterator</a> class is an iterator for Q3StrList.</p>
 
61
<hr />
 
62
<h2>Member Function Documentation</h2>
 
63
<h3 class="fn"><a name="Q3StrList"></a>Q3StrList::Q3StrList ( bool <i>deepCopies</i> = true )</h3>
 
64
<p>Constructs an empty list of strings. Will make deep copies of all inserted strings if <i>deepCopies</i> is TRUE, or use shallow copies if <i>deepCopies</i> is FALSE.</p>
 
65
<h3 class="fn"><a name="Q3StrList-2"></a>Q3StrList::Q3StrList ( const Q3StrList &amp; <i>list</i> )</h3>
 
66
<p>Constructs a copy of <i>list</i>.</p>
 
67
<h3 class="fn"><a name="Q3StrList-3"></a>Q3StrList::Q3StrList ( const <a href="qlist.html">QList</a>&lt;<a href="qbytearray.html">QByteArray</a>&gt; &amp; <i>list</i> )</h3>
 
68
<p>Constructs a copy of <i>list</i>.</p>
 
69
<h3 class="fn"><a name="dtor.Q3StrList"></a>Q3StrList::~Q3StrList ()</h3>
 
70
<p>Destroys the list. All strings are removed.</p>
 
71
<h3 class="fn"><a name="operator-QList-ltQByteArray-gt"></a>Q3StrList::operator QList&lt;QByteArray&gt; () const</h3>
 
72
<p>Automatically converts a <a href="q3strlist.html">Q3StrList</a> into a <a href="qlist.html">QList</a>&lt;<a href="qbytearray.html">QByteArray</a>&gt;.</p>
 
73
<h3 class="fn"><a name="operator-eq"></a>Q3StrList &amp; Q3StrList::operator= ( const Q3StrList &amp; <i>list</i> )</h3>
 
74
<p>Assigns <i>list</i> to this list and returns a reference to this list.</p>
 
75
<h3 class="fn"><a name="operator-eq-2"></a>Q3StrList &amp; Q3StrList::operator= ( const <a href="qlist.html">QList</a>&lt;<a href="qbytearray.html">QByteArray</a>&gt; &amp; <i>list</i> )</h3>
 
76
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
77
<p>Assigns <i>list</i> to this list and returns a reference to this list.</p>
 
78
<p /><address><hr /><div align="center">
 
79
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
80
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
81
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
82
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
83
</tr></table></div></address></body>
 
84
</html>