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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3ptrdict.qdoc -->
<title>Qt 4.8: Q3PtrDict Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3PtrDict</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3PtrDict Class Reference</h1>
<!-- $$$Q3PtrDict-brief -->
<p>The Q3PtrDict class is a template class that provides a dictionary based on void* keys. <a href="#details">More...</a></p>
<!-- @@@Q3PtrDict -->
<pre class="cpp"> <span class="preprocessor">#include <Q3PtrDict></span></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 <a href="porting4.html">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3ptrcollection.html">Q3PtrCollection</a>.</p>
<ul>
<li><a href="q3ptrdict-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#Q3PtrDict">Q3PtrDict</a></b> ( int <i>size</i> = 17 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#Q3PtrDict-2">Q3PtrDict</a></b> ( const Q3PtrDict<type> & <i>dict</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#dtor.Q3PtrDict">~Q3PtrDict</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> type * </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#find">find</a></b> ( void * <i>key</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#insert">insert</a></b> ( void * <i>key</i>, const type * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#isEmpty">isEmpty</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#remove">remove</a></b> ( void * <i>key</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#replace">replace</a></b> ( void * <i>key</i>, const type * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#resize">resize</a></b> ( uint <i>newsize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#size">size</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#statistics">statistics</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> type * </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#take">take</a></b> ( void * <i>key</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3PtrDict<type> & </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#operator-eq">operator=</a></b> ( const Q3PtrDict<type> & <i>dict</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> type * </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#operator-5b-5d">operator[]</a></b> ( void * <i>key</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual uint </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#count">count</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">4 public functions inherited from <a href="q3ptrcollection.html#public-functions">Q3PtrCollection</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#read">read</a></b> ( QDataStream & <i>s</i>, Q3PtrCollection::Item & <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="q3ptrdict.html#write">write</a></b> ( QDataStream & <i>s</i>, Q3PtrCollection::Item <i>item</i> ) const</td></tr>
</table>
<ul>
<li class="fn">2 protected functions inherited from <a href="q3ptrcollection.html#protected-functions">Q3PtrCollection</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3PtrDict-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3PtrDict class is a template class that provides a dictionary based on void* keys.</p>
<p>Q3PtrDict is implemented as a template class. Define a template instance Q3PtrDict<X> to create a dictionary that operates on pointers to X (X*).</p>
<p>A dictionary is a collection of key-value pairs. The key is a void* used for insertion, removal and lookup. The value is a pointer. Dictionaries provide very fast insertion and lookup.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type">Q3PtrDict</span><span class="operator"><</span><span class="type">char</span><span class="operator">></span> fields; <span class="comment">// void* keys, char* values</span>
<span class="type"><a href="qlineedit.html">QLineEdit</a></span> <span class="operator">*</span>le1 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>( <span class="keyword">this</span> );
le1<span class="operator">-</span><span class="operator">></span>setText( <span class="string">"Simpson"</span> );
<span class="type"><a href="qlineedit.html">QLineEdit</a></span> <span class="operator">*</span>le2 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>( <span class="keyword">this</span> );
le2<span class="operator">-</span><span class="operator">></span>setText( <span class="string">"Homer"</span> );
<span class="type"><a href="qlineedit.html">QLineEdit</a></span> <span class="operator">*</span>le3 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>( <span class="keyword">this</span> );
le3<span class="operator">-</span><span class="operator">></span>setText( <span class="string">"45"</span> );
fields<span class="operator">.</span><a href="q3ptrdict.html#insert">insert</a>( le1<span class="operator">,</span> <span class="string">"Surname"</span> );
fields<span class="operator">.</span><a href="q3ptrdict.html#insert">insert</a>( le2<span class="operator">,</span> <span class="string">"Forename"</span> );
fields<span class="operator">.</span><a href="q3ptrdict.html#insert">insert</a>( le3<span class="operator">,</span> <span class="string">"Age"</span> );
<span class="type"><a href="q3ptrdictiterator.html">Q3PtrDictIterator</a></span><span class="operator"><</span><span class="type">char</span><span class="operator">></span> it( fields );
<span class="keyword">for</span>( ; it<span class="operator">.</span>current(); <span class="operator">+</span><span class="operator">+</span>it )
cout <span class="operator"><</span><span class="operator"><</span> it<span class="operator">.</span>current() <span class="operator"><</span><span class="operator"><</span> endl;
cout <span class="operator"><</span><span class="operator"><</span> endl;
<span class="keyword">if</span> ( fields<span class="operator">[</span>le1<span class="operator">]</span> ) <span class="comment">// Prints "Surname: Simpson"</span>
cout <span class="operator"><</span><span class="operator"><</span> fields<span class="operator">[</span>le1<span class="operator">]</span> <span class="operator"><</span><span class="operator"><</span> <span class="string">": "</span> <span class="operator"><</span><span class="operator"><</span> le1<span class="operator">-</span><span class="operator">></span>text() <span class="operator"><</span><span class="operator"><</span> endl;
<span class="keyword">if</span> ( fields<span class="operator">[</span>le2<span class="operator">]</span> ) <span class="comment">// Prints "Forename: Homer"</span>
cout <span class="operator"><</span><span class="operator"><</span> fields<span class="operator">[</span>le2<span class="operator">]</span> <span class="operator"><</span><span class="operator"><</span> <span class="string">": "</span> <span class="operator"><</span><span class="operator"><</span> le2<span class="operator">-</span><span class="operator">></span>text() <span class="operator"><</span><span class="operator"><</span> endl;
fields<span class="operator">.</span><a href="q3ptrdict.html#remove">remove</a>( le1 ); <span class="comment">// Removes le1 from the dictionary</span>
cout <span class="operator"><</span><span class="operator"><</span> le1<span class="operator">-</span><span class="operator">></span>text() <span class="operator"><</span><span class="operator"><</span> endl; <span class="comment">// Prints "Simpson"</span></pre>
<p>In this example we use a dictionary to add an extra property (a char*) to the line edits we're using.</p>
<p>See <a href="q3dict.html">Q3Dict</a> for full details, including the choice of dictionary size, and how deletions are handled.</p>
</div>
<p><b>See also </b><a href="q3ptrdictiterator.html">Q3PtrDictIterator</a>, <a href="q3dict.html">Q3Dict</a>, <a href="q3asciidict.html">Q3AsciiDict</a>, and <a href="q3intdict.html">Q3IntDict</a>.</p>
<!-- @@@Q3PtrDict -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3PtrDict[overload1]$$$Q3PtrDictint -->
<h3 class="fn"><a name="Q3PtrDict"></a>Q3PtrDict::<span class="name">Q3PtrDict</span> ( <span class="type">int</span> <i>size</i> = 17 )</h3>
<p>Constructs a dictionary using an internal hash array with the size <i>size</i>.</p>
<p>Setting <i>size</i> to a suitably large prime number (equal to or greater than the expected number of entries) makes the hash distribution better and improves lookup performance.</p>
<!-- @@@Q3PtrDict -->
<!-- $$$Q3PtrDict$$$Q3PtrDictconstQ3PtrDict<type>& -->
<h3 class="fn"><a name="Q3PtrDict-2"></a>Q3PtrDict::<span class="name">Q3PtrDict</span> ( const <span class="type">Q3PtrDict</span><<span class="type">type</span>> & <i>dict</i> )</h3>
<p>Constructs a copy of <i>dict</i>.</p>
<p>Each item in <i>dict</i> is inserted into this dictionary. Only the pointers are copied (shallow copy).</p>
<!-- @@@Q3PtrDict -->
<!-- $$$~Q3PtrDict[overload1]$$$~Q3PtrDict -->
<h3 class="fn"><a name="dtor.Q3PtrDict"></a>Q3PtrDict::<span class="name">~Q3PtrDict</span> ()</h3>
<p>Removes all items from the dictionary and destroys it.</p>
<p>All iterators that access this dictionary will be reset.</p>
<p><b>See also </b><a href="q3ptrcollection.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@~Q3PtrDict -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> Q3PtrDict::<span class="name">clear</span> ()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3ptrcollection.html#clear">Q3PtrCollection::clear</a>().</p>
<p>Removes all items from the dictionary.</p>
<p>The removed items are deleted if <a href="q3ptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.</p>
<p>All dictionary iterators that access this dictionary will be reset.</p>
<p><b>See also </b><a href="q3ptrdict.html#remove">remove</a>(), <a href="q3ptrdict.html#take">take</a>(), and <a href="q3ptrcollection.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@clear -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn"><a name="count"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> Q3PtrDict::<span class="name">count</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3ptrcollection.html#count">Q3PtrCollection::count</a>().</p>
<p>Returns the number of items in the dictionary.</p>
<p><b>See also </b><a href="q3ptrdict.html#isEmpty">isEmpty</a>().</p>
<!-- @@@count -->
<!-- $$$find[overload1]$$$findvoid* -->
<h3 class="fn"><a name="find"></a><span class="type">type</span> * Q3PtrDict::<span class="name">find</span> ( <span class="type">void</span> * <i>key</i> ) const</h3>
<p>Returns the item associated with <i>key</i>, or 0 if the key does not exist in the dictionary.</p>
<p>If there are two or more items with equal keys, then the most recently inserted item will be found.</p>
<p>Equivalent to operator[].</p>
<p><b>See also </b><a href="q3ptrdict.html#operator-5b-5d">operator[]</a>().</p>
<!-- @@@find -->
<!-- $$$insert[overload1]$$$insertvoid*consttype* -->
<h3 class="fn"><a name="insert"></a><span class="type">void</span> Q3PtrDict::<span class="name">insert</span> ( <span class="type">void</span> * <i>key</i>, const <span class="type">type</span> * <i>item</i> )</h3>
<p>Inserts the <i>key</i> with the <i>item</i> into the dictionary.</p>
<p>Multiple items can have the same key, in which case only the last item will be accessible using <a href="q3ptrdict.html#operator-5b-5d">operator[]</a>().</p>
<p><i>item</i> may not be 0.</p>
<p><b>See also </b><a href="q3ptrdict.html#replace">replace</a>().</p>
<!-- @@@insert -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn"><a name="isEmpty"></a><span class="type">bool</span> Q3PtrDict::<span class="name">isEmpty</span> () const</h3>
<p>Returns TRUE if the dictionary is empty; otherwise returns FALSE.</p>
<p><b>See also </b><a href="q3ptrdict.html#count">count</a>().</p>
<!-- @@@isEmpty -->
<!-- $$$read[overload1]$$$readQDataStream&Q3PtrCollection::Item& -->
<h3 class="fn"><a name="read"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & Q3PtrDict::<span class="name">read</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>s</i>, <span class="type"><a href="q3ptrcollection.html#Item-typedef">Q3PtrCollection::Item</a></span> & <i>item</i> )<tt> [virtual protected]</tt></h3>
<p>Reads a dictionary item from the stream <i>s</i> and returns a reference to the stream.</p>
<p>The default implementation sets <i>item</i> to 0.</p>
<p><b>See also </b><a href="q3ptrdict.html#write">write</a>().</p>
<!-- @@@read -->
<!-- $$$remove[overload1]$$$removevoid* -->
<h3 class="fn"><a name="remove"></a><span class="type">bool</span> Q3PtrDict::<span class="name">remove</span> ( <span class="type">void</span> * <i>key</i> )</h3>
<p>Removes the item associated with <i>key</i> from the dictionary. Returns TRUE if successful, i.e. if <i>key</i> is in the dictionary; otherwise returns FALSE.</p>
<p>If there are two or more items with equal keys, then the most recently inserted item will be removed.</p>
<p>The removed item is deleted if <a href="q3ptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.</p>
<p>All dictionary iterators that refer to the removed item will be set to point to the next item in the dictionary traversal order.</p>
<p><b>See also </b><a href="q3ptrdict.html#take">take</a>(), <a href="q3ptrdict.html#clear">clear</a>(), and <a href="q3ptrcollection.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@remove -->
<!-- $$$replace[overload1]$$$replacevoid*consttype* -->
<h3 class="fn"><a name="replace"></a><span class="type">void</span> Q3PtrDict::<span class="name">replace</span> ( <span class="type">void</span> * <i>key</i>, const <span class="type">type</span> * <i>item</i> )</h3>
<p>If the dictionary has key <i>key</i>, this key's item is replaced with <i>item</i>. If the dictionary doesn't contain key <i>key</i>, <i>item</i> is inserted into the dictionary using key <i>key</i>.</p>
<p><i>item</i> may not be 0.</p>
<p>Equivalent to</p>
<pre class="cpp"> <span class="type"><a href="q3ptrdict.html">Q3PtrDict</a></span><span class="operator"><</span>ItemType<span class="operator">></span> dict;
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="keyword">if</span> ( dict<span class="operator">.</span>find( key ) )
dict<span class="operator">.</span><a href="q3ptrdict.html#remove">remove</a>( key );
dict<span class="operator">.</span><a href="q3ptrdict.html#insert">insert</a>( key<span class="operator">,</span> item );</pre>
<p>If there are two or more items with equal keys, then the most recently inserted item will be replaced.</p>
<p><b>See also </b><a href="q3ptrdict.html#insert">insert</a>().</p>
<!-- @@@replace -->
<!-- $$$resize[overload1]$$$resizeuint -->
<h3 class="fn"><a name="resize"></a><span class="type">void</span> Q3PtrDict::<span class="name">resize</span> ( <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>newsize</i> )</h3>
<p>Changes the size of the hash table to <i>newsize</i>. The contents of the dictionary are preserved, but all iterators on the dictionary become invalid.</p>
<!-- @@@resize -->
<!-- $$$size[overload1]$$$size -->
<h3 class="fn"><a name="size"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> Q3PtrDict::<span class="name">size</span> () const</h3>
<p>Returns the size of the internal hash table (as specified in the constructor).</p>
<p><b>See also </b><a href="q3ptrdict.html#count">count</a>().</p>
<!-- @@@size -->
<!-- $$$statistics[overload1]$$$statistics -->
<h3 class="fn"><a name="statistics"></a><span class="type">void</span> Q3PtrDict::<span class="name">statistics</span> () const</h3>
<p>Debugging-only function that prints out the dictionary distribution using <a href="qtglobal.html#qDebug">qDebug</a>().</p>
<!-- @@@statistics -->
<!-- $$$take[overload1]$$$takevoid* -->
<h3 class="fn"><a name="take"></a><span class="type">type</span> * Q3PtrDict::<span class="name">take</span> ( <span class="type">void</span> * <i>key</i> )</h3>
<p>Takes the item associated with <i>key</i> out of the dictionary without deleting it (even if <a href="q3ptrcollection.html#setAutoDelete">auto-deletion</a> is enabled).</p>
<p>If there are two or more items with equal keys, then the most recently inserted item will be removed.</p>
<p>Returns a pointer to the item taken out, or 0 if the key does not exist in the dictionary.</p>
<p>All dictionary iterators that refer to the taken item will be set to point to the next item in the dictionary traversal order.</p>
<p><b>See also </b><a href="q3ptrdict.html#remove">remove</a>(), <a href="q3ptrdict.html#clear">clear</a>(), and <a href="q3ptrcollection.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@take -->
<!-- $$$write[overload1]$$$writeQDataStream&Q3PtrCollection::Item -->
<h3 class="fn"><a name="write"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & Q3PtrDict::<span class="name">write</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>s</i>, <span class="type"><a href="q3ptrcollection.html#Item-typedef">Q3PtrCollection::Item</a></span> <i>item</i> ) const<tt> [virtual protected]</tt></h3>
<p>Writes a dictionary <i>item</i> to the stream <i>s</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="q3ptrdict.html#read">read</a>().</p>
<!-- @@@write -->
<!-- $$$operator=[overload1]$$$operator=constQ3PtrDict<type>& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">Q3PtrDict</span><<span class="type">type</span>> & Q3PtrDict::<span class="name">operator=</span> ( const <span class="type">Q3PtrDict</span><<span class="type">type</span>> & <i>dict</i> )</h3>
<p>Assigns <i>dict</i> to this dictionary and returns a reference to this dictionary.</p>
<p>This dictionary is first cleared and then each item in <i>dict</i> is inserted into the dictionary. Only the pointers are copied (shallow copy), unless <a href="q3ptrcollection.html#newItem">newItem</a>() has been reimplemented.</p>
<!-- @@@operator= -->
<!-- $$$operator[][overload1]$$$operator[]void* -->
<h3 class="fn"><a name="operator-5b-5d"></a><span class="type">type</span> * Q3PtrDict::<span class="name">operator[]</span> ( <span class="type">void</span> * <i>key</i> ) const</h3>
<p>Returns the item associated with <i>key</i>, or 0 if the key does not exist in the dictionary.</p>
<p>If there are two or more items with equal keys, then the most recently inserted item will be found.</p>
<p>Equivalent to the <a href="q3ptrdict.html#find">find</a>() function.</p>
<p><b>See also </b><a href="q3ptrdict.html#find">find</a>().</p>
<!-- @@@operator[] -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|