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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
|
<!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 - QGVector 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>QGVector Class Reference</h1><br clear="all">
<p>
The QGVector class is an internal class for implementing Qt collection classes.
<a href="#details">More...</a>
<p>
<code>#include <<a href="qgvector-h.html">qgvector.h</a>></code>
<p>
Inherits <a href="qcollection.html">QCollection</a>.
<p>Inherited by <a href="qvector.html">QVector</a>.
<p><a href="qgvector-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn">QDataStream&<b>read</b>(QDataStream&)(internal)</div>
<li><div class="fn">QDataStream&<b>write</b>(QDataStream&)const(internal)</div>
<li><div class="fn">virtualint<a href="#817164"><b>compareItems</b></a>(Item, Item)</div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn"><b>QGVector</b>()(internal)</div>
<li><div class="fn"><b>QGVector</b>(uintsize)(internal)</div>
<li><div class="fn"><b>QGVector</b>(constQGVector&v)(internal)</div>
<li><div class="fn"><b>~QGVector</b>()(internal)</div>
<li><div class="fn">QGVector&<b>operator=</b>(constQGVector&v)(internal)</div>
<li><div class="fn">Item*<a href="#305406"><b>data</b></a>()const</div>
<li><div class="fn">uint<a href="#ab362c"><b>size</b></a>()const</div>
<li><div class="fn">virtualuint<a href="#ef746a"><b>count</b></a>()const</div>
<li><div class="fn">bool<b>insert</b>(uintindex, Item)(internal)</div>
<li><div class="fn">bool<b>remove</b>(uintindex)(internal)</div>
<li><div class="fn">Item<b>take</b>(uintindex)</div>
<li><div class="fn">virtualvoid<b>clear</b>()(internal)</div>
<li><div class="fn">bool<b>resize</b>(uintnewsize)(internal)</div>
<li><div class="fn">bool<b>fill</b>(Item, intflen)(internal)</div>
<li><div class="fn">void<b>sort</b>()(internal)</div>
<li><div class="fn">int<b>bsearch</b>(Item)const(internal)</div>
<li><div class="fn">int<b>findRef</b>(Item, uintindex)const(internal)</div>
<li><div class="fn">int<b>find</b>(Item, uintindex)const(internal)</div>
<li><div class="fn">uint<b>containsRef</b>(Item)const(internal)</div>
<li><div class="fn">uint<b>contains</b>(Item)const(internal)</div>
<li><div class="fn">Item<a href="#cb6eaa"><b>at</b></a>(uintindex)const</div>
<li><div class="fn">bool<b>insertExpand</b>(uintindex, Item)(internal)</div>
<li><div class="fn">void<b>toList</b>(QGList*)const(internal)</div>
<li><div class="fn">virtualQDataStream&<a href="#c74c55"><b>read</b></a>(QDataStream&, Item&)</div>
<li><div class="fn">virtualQDataStream&<a href="#a5f0ce"><b>write</b></a>(QDataStream&, Item)const</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QGVector class is an internal class for implementing Qt collection classes.
<p>
QGVector is a strictly internal class that acts as a base class for
the <a href="qvector.html">QVector</a> collection class.
<p>QGVector has some virtual functions that may be reimplemented in
subclasses to customize behavior.
<p><ul>
<li> <a href="#817164">compareItems</a>() compares two collection/vector items.
<li> <a href="#b9f6ed">read</a>() reads a collection/vector item from a <a href="qdatastream.html">QDataStream</a>.
<li> <a href="#3a5b47">write</a>() writes a collection/vector item to a QDataStream.
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a href="qcollection.html#Item">Item</a><a name="cb6eaa"></a>QGVector::at(uintindex)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">int<a name="817164"></a>QGVector::compareItems(<a href="qcollection.html#Item">Item</a>d1, <a href="qcollection.html#Item">Item</a>d2) <code>[virtual]</code></h3>
<p>This virtual function compares two list items.
<p>Returns:
<ul>
<li> 0 if <em>item1</em> == <em>item2</em>
<li> non-zero if <em>item1</em> != <em>item2</em>
</ul>
<p>This function returns <em>int</em> rather than <em>bool</em> so that
reimplementations can return one of three values and use it to sort
by:
<p><ul>
<li> 0 if <em>item1</em> == <em>item2</em>
<li> > 0 (positive integer) if <em>item1</em> > <em>item2</em>
<li> < 0 (negative integer) if <em>item1</em> < <em>item2</em>
</ul>
<p>The <a href="qvector.html#d50667">QVector::sort</a>() and <a href="qvector.html#8567a9">QVector::bsearch</a>() functions require that
compareItems() is implemented as described here.
<p>This function should not modify the vector because some const
functions call compareItems().
<h3 class="fn">uint<a name="ef746a"></a>QGVector::count()const <code>[virtualprotected]</code></h3>
<p>For internal use only.
<p>Reimplemented from <a href="qcollection.html#649c42">QCollection.</a>
<h3 class="fn"><a href="qcollection.html#Item">Item</a>*<a name="305406"></a>QGVector::data()const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a href="qdatastream.html">QDataStream</a>&<a name="c74c55"></a>QGVector::read(<a href="qdatastream.html">QDataStream</a>&s, <a href="qcollection.html#Item">Item</a>&d) <code>[virtualprotected]</code></h3>
<p>Reads a collection/vector item from the stream <em>s</em> and returns a reference
to the stream.
<p>The default implementation sets <em>item</em> to 0.
<p>See also <a href="#3a5b47">write</a>().
<h3 class="fn">uint<a name="ab362c"></a>QGVector::size()const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a href="qdatastream.html">QDataStream</a>&<a name="a5f0ce"></a>QGVector::write(<a href="qdatastream.html">QDataStream</a>&s, <a href="qcollection.html#Item">Item</a>)const <code>[virtualprotected]</code></h3>
<p>Writes a collection/vector item to the stream <em>s</em> and returns a reference
to the stream.
<p>The default implementation does nothing.
<p>See also <a href="#b9f6ed">read</a>().
<h3 class="fn"><a name="18180b"></a>QGVector::QGVector() <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a name="5f680e"></a>QGVector::QGVector(constQGVector&a) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a name="03b1a3"></a>QGVector::QGVector(uintsize) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a name="542f52"></a>QGVector::~QGVector() <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">int<a name="632559"></a>QGVector::bsearch(<a href="qcollection.html#Item">Item</a>d)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">void<a name="77d753"></a>QGVector::clear() <code>[virtualprotected]</code></h3>
<p>For internal use only.
<p>Reimplemented from <a href="qcollection.html#10eb2d">QCollection.</a>
<h3 class="fn">uint<a name="e8e4cf"></a>QGVector::contains(<a href="qcollection.html#Item">Item</a>d)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">uint<a name="3f2afb"></a>QGVector::containsRef(<a href="qcollection.html#Item">Item</a>d)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">bool<a name="4b995b"></a>QGVector::fill(<a href="qcollection.html#Item">Item</a>d, intflen) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">int<a name="4f8653"></a>QGVector::find(<a href="qcollection.html#Item">Item</a>d, uintindex)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">int<a name="41eba7"></a>QGVector::findRef(<a href="qcollection.html#Item">Item</a>d, uintindex)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">bool<a name="6a5f66"></a>QGVector::insert(uintindex, <a href="qcollection.html#Item">Item</a>d) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">bool<a name="dfdcaa"></a>QGVector::insertExpand(uintindex, <a href="qcollection.html#Item">Item</a>d) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">QGVector&<a name="203cce"></a>QGVector::operator=(constQGVector&v) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a href="qdatastream.html">QDataStream</a>&<a name="b9f6ed"></a>QGVector::read(<a href="qdatastream.html">QDataStream</a>&s)</h3>
<p>For internal use only.
<h3 class="fn">bool<a name="ffa1b6"></a>QGVector::remove(uintindex) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">bool<a name="ac64bc"></a>QGVector::resize(uintnewsize) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">void<a name="4cd673"></a>QGVector::sort() <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">void<a name="6ee130"></a>QGVector::toList(<a href="qglist.html">QGList</a>*list)const <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn"><a href="qdatastream.html">QDataStream</a>&<a name="3a5b47"></a>QGVector::write(<a href="qdatastream.html">QDataStream</a>&s)const</h3>
<p>For internal use only.
<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.1"><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 © 1995-2000
<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 2000 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.1</div>
</table></div></address></body></html>
|