File: classwx_hash_map.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (557 lines) | stat: -rw-r--r-- 35,126 bytes parent folder | download | duplicates (2)
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: wxHashMap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classwx_hash_map-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxHashMap Class Reference<div class="ingroups"><a class="el" href="group__group__class__containers.html">Containers</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/hashmap.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This is a simple, type-safe, and reasonably efficient hash map class, whose interface is a subset of the interface of STL containers. </p>
<p>In particular, the interface is modelled after std::map, and the various, non-standard, std::hash_map (<a href="http://www.cppreference.com/wiki/stl/map/start">http://www.cppreference.com/wiki/stl/map/start</a>).</p>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyClass { ... };</div>
<div class="line"></div>
<div class="line"><span class="comment">// declare a hash map with string keys and int values</span></div>
<div class="line">WX_DECLARE_STRING_HASH_MAP( <span class="keywordtype">int</span>, MyHash5 );</div>
<div class="line"><span class="comment">// same, with int keys and MyClass* values</span></div>
<div class="line">WX_DECLARE_HASH_MAP( <span class="keywordtype">int</span>, MyClass*, wxIntegerHash, wxIntegerEqual, MyHash1 );</div>
<div class="line"><span class="comment">// same, with wxString keys and int values</span></div>
<div class="line">WX_DECLARE_STRING_HASH_MAP( <span class="keywordtype">int</span>, MyHash3 );</div>
<div class="line"><span class="comment">// same, with wxString keys and values</span></div>
<div class="line">WX_DECLARE_STRING_HASH_MAP( <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>, MyHash2 );</div>
<div class="line"></div>
<div class="line">MyHash1 h1;</div>
<div class="line">MyHash2 h2;</div>
<div class="line"></div>
<div class="line"><span class="comment">// store and retrieve values</span></div>
<div class="line">h1[1] = <span class="keyword">new</span> MyClass( 1 );</div>
<div class="line">h1[10000000] = NULL;</div>
<div class="line">h1[50000] = <span class="keyword">new</span> MyClass( 2 );</div>
<div class="line">h2[<span class="stringliteral">&quot;Bill&quot;</span>] = <span class="stringliteral">&quot;ABC&quot;</span>;</div>
<div class="line"><a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> tmp = h2[<span class="stringliteral">&quot;Bill&quot;</span>];</div>
<div class="line"><span class="comment">// since element with key &quot;Joe&quot; is not present, this will return</span></div>
<div class="line"><span class="comment">// the default value, which is an empty string in the case of wxString</span></div>
<div class="line">MyClass tmp2 = h2[<span class="stringliteral">&quot;Joe&quot;</span>];</div>
<div class="line"></div>
<div class="line"><span class="comment">// iterate over all the elements in the class</span></div>
<div class="line">MyHash2::iterator it;</div>
<div class="line"><span class="keywordflow">for</span>( it = h2.begin(); it != h2.end(); ++it )</div>
<div class="line">{</div>
<div class="line">    <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> key = it-&gt;first, value = it-&gt;second;</div>
<div class="line">    <span class="comment">// do something useful with key and value</span></div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="hashmap_declaringnew"></a>
Declaring new hash table types</h1>
<div class="fragment"><div class="line">WX_DECLARE_STRING_HASH_MAP( VALUE_T,     <span class="comment">// type of the values</span></div>
<div class="line">                            CLASSNAME ); <span class="comment">// name of the class</span></div>
</div><!-- fragment --><p> Declares a hash map class named CLASSNAME, with <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> keys and VALUE_T values.</p>
<div class="fragment"><div class="line">WX_DECLARE_VOIDPTR_HASH_MAP( VALUE_T,     <span class="comment">// type of the values</span></div>
<div class="line">                            CLASSNAME ); <span class="comment">// name of the class</span></div>
</div><!-- fragment --><p> Declares a hash map class named CLASSNAME, with void* keys and VALUE_T values.</p>
<div class="fragment"><div class="line">WX_DECLARE_HASH_MAP( KEY_T,      <span class="comment">// type of the keys</span></div>
<div class="line">                     VALUE_T,    <span class="comment">// type of the values</span></div>
<div class="line">                     HASH_T,     <span class="comment">// hasher</span></div>
<div class="line">                     KEY_EQ_T,   <span class="comment">// key equality predicate</span></div>
<div class="line">                     CLASSNAME); <span class="comment">// name of the class</span></div>
</div><!-- fragment --><p> The HASH_T and KEY_EQ_T are the types used for the hashing function and key comparison. wxWidgets provides three predefined hashing functions: <code>wxIntegerHash</code> for integer types ( int, long, short, and their unsigned counterparts ), <code>wxStringHash</code> for strings ( <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>, wxChar*, char* ), and <code>wxPointerHash</code> for any kind of pointer. Similarly three equality predicates: <code>wxIntegerEqual</code>, <code>wxStringEqual</code>, <code>wxPointerEqual</code> are provided. Using this you could declare a hash map mapping int values to <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> like this:</p>
<div class="fragment"><div class="line">WX_DECLARE_HASH_MAP( <span class="keywordtype">int</span>,</div>
<div class="line">                     <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>,</div>
<div class="line">                     wxIntegerHash,</div>
<div class="line">                     wxIntegerEqual,</div>
<div class="line">                     MyHash );</div>
<div class="line"></div>
<div class="line"><span class="comment">// using an user-defined class for keys</span></div>
<div class="line"><span class="keyword">class </span>MyKey { ... };</div>
<div class="line"></div>
<div class="line"><span class="comment">// hashing function</span></div>
<div class="line"><span class="keyword">class </span>MyKeyHash</div>
<div class="line">{</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">    MyKeyHash() { }</div>
<div class="line"></div>
<div class="line">    <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> operator()( <span class="keyword">const</span> MyKey&amp; k )<span class="keyword"> const</span></div>
<div class="line"><span class="keyword">        </span>{</div>
<div class="line">            <span class="comment">// compute the hash</span></div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">    MyKeyHash&amp; operator=(<span class="keyword">const</span> MyKeyHash&amp;) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line">};</div>
<div class="line"></div>
<div class="line"><span class="comment">// comparison operator</span></div>
<div class="line"><span class="keyword">class </span>MyKeyEqual</div>
<div class="line">{</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">    MyKeyEqual() { }</div>
<div class="line">    <span class="keywordtype">bool</span> operator()( <span class="keyword">const</span> MyKey&amp; a, <span class="keyword">const</span> MyKey&amp; b )<span class="keyword"> const</span></div>
<div class="line"><span class="keyword">        </span>{</div>
<div class="line">           <span class="comment">// compare for equality</span></div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">    MyKeyEqual&amp; operator=(<span class="keyword">const</span> MyKeyEqual&amp;) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line">};</div>
<div class="line"></div>
<div class="line">WX_DECLARE_HASH_MAP( MyKey,      <span class="comment">// type of the keys</span></div>
<div class="line">                     SOME_TYPE,  <span class="comment">// any type you like</span></div>
<div class="line">                     MyKeyHash,  <span class="comment">// hasher</span></div>
<div class="line">                     MyKeyEqual, <span class="comment">// key equality predicate</span></div>
<div class="line">                     CLASSNAME); <span class="comment">// name of the class</span></div>
</div><!-- fragment --><h1><a class="anchor" id="hashmap_types"></a>
Types</h1>
<p>In the documentation below you should replace <a class="el" href="classwx_hash_map.html" title="This is a simple, type-safe, and reasonably efficient hash map class, whose interface is a subset of ...">wxHashMap</a> with the name you used in the class declaration.</p>
<ul>
<li>wxHashMap::key_type: Type of the hash keys.</li>
<li>wxHashMap::mapped_type: Type of the values stored in the hash map.</li>
<li>wxHashMap::value_type: Equivalent to struct { key_type first; mapped_type second }.</li>
<li>wxHashMap::iterator: Used to enumerate all the elements in a hash map; it is similar to a value_type*.</li>
<li>wxHashMap::const_iterator: Used to enumerate all the elements in a constant hash map; it is similar to a const value_type*.</li>
<li>wxHashMap::size_type: Used for sizes.</li>
<li>wxHashMap::Insert_Result: The return value for <a class="el" href="classwx_hash_map.html#ad88d3a3507b253cf53091e052b2746a7" title="Inserts the given value in the hash map.">insert()</a>.</li>
</ul>
<h1><a class="anchor" id="hashmap_iter"></a>
Iterators</h1>
<p>An iterator is similar to a pointer, and so you can use the usual pointer operations: ++it ( and it++ ) to move to the next element, *it to access the element pointed to, it-&gt;first ( it-&gt;second ) to access the key ( value ) of the element pointed to.</p>
<p>Hash maps provide forward only iterators, this means that you can't use &ndash;it, it + 3, it1 - it2.</p>
<h1><a class="anchor" id="hashmap_predef"></a>
Predefined hashmap types</h1>
<p>wxWidgets defines the following hashmap types:</p>
<ul>
<li>wxLongToLongHashMap (uses long both for keys and values)</li>
<li>wxStringToStringHashMap (uses <a class="el" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a> both for keys and values)</li>
</ul>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxbase">wxBase</a></span></div><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__containers.html">Containers</a></span></div> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8a013c04695c80c27bcb483928b45055"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a8a013c04695c80c27bcb483928b45055">wxHashMap</a> (size_type <a class="el" href="classwx_hash_map.html#a83b1ef9d30a009732055bd2ad26c27b1">size</a>=10)</td></tr>
<tr class="memdesc:a8a013c04695c80c27bcb483928b45055"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size parameter is just a hint, the table will resize automatically to preserve performance.  <a href="#a8a013c04695c80c27bcb483928b45055"></a><br/></td></tr>
<tr class="separator:a8a013c04695c80c27bcb483928b45055"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae890044e2344b1838517a6f82b6a6ab7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#ae890044e2344b1838517a6f82b6a6ab7">wxHashMap</a> (const <a class="el" href="classwx_hash_map.html">wxHashMap</a> &amp;map)</td></tr>
<tr class="memdesc:ae890044e2344b1838517a6f82b6a6ab7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#ae890044e2344b1838517a6f82b6a6ab7"></a><br/></td></tr>
<tr class="separator:ae890044e2344b1838517a6f82b6a6ab7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58c9783bb91068a645a3c91a19c124fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a58c9783bb91068a645a3c91a19c124fd">clear</a> ()</td></tr>
<tr class="memdesc:a58c9783bb91068a645a3c91a19c124fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all elements from the hash map.  <a href="#a58c9783bb91068a645a3c91a19c124fd"></a><br/></td></tr>
<tr class="separator:a58c9783bb91068a645a3c91a19c124fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a852c3250b25caaa8bd76327c3c9fe2a1"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a852c3250b25caaa8bd76327c3c9fe2a1">count</a> (const key_type &amp;key) const </td></tr>
<tr class="memdesc:a852c3250b25caaa8bd76327c3c9fe2a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Counts the number of elements with the given key present in the map.  <a href="#a852c3250b25caaa8bd76327c3c9fe2a1"></a><br/></td></tr>
<tr class="separator:a852c3250b25caaa8bd76327c3c9fe2a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07153a28283f93a46faf0ccb340114dd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a07153a28283f93a46faf0ccb340114dd">empty</a> () const </td></tr>
<tr class="memdesc:a07153a28283f93a46faf0ccb340114dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <span class="literal">true</span> if the hash map does not contain any elements, <span class="literal">false</span> otherwise.  <a href="#a07153a28283f93a46faf0ccb340114dd"></a><br/></td></tr>
<tr class="separator:a07153a28283f93a46faf0ccb340114dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad88d3a3507b253cf53091e052b2746a7"><td class="memItemLeft" align="right" valign="top">Insert_Result&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#ad88d3a3507b253cf53091e052b2746a7">insert</a> (const value_type &amp;v)</td></tr>
<tr class="memdesc:ad88d3a3507b253cf53091e052b2746a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts the given value in the hash map.  <a href="#ad88d3a3507b253cf53091e052b2746a7"></a><br/></td></tr>
<tr class="separator:ad88d3a3507b253cf53091e052b2746a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab93ea3e530789910f94a727243ae6863"><td class="memItemLeft" align="right" valign="top">mapped_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#ab93ea3e530789910f94a727243ae6863">operator[]</a> (const key_type &amp;key)</td></tr>
<tr class="memdesc:ab93ea3e530789910f94a727243ae6863"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the key as an array subscript.  <a href="#ab93ea3e530789910f94a727243ae6863"></a><br/></td></tr>
<tr class="separator:ab93ea3e530789910f94a727243ae6863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83b1ef9d30a009732055bd2ad26c27b1"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a83b1ef9d30a009732055bd2ad26c27b1">size</a> () const </td></tr>
<tr class="memdesc:a83b1ef9d30a009732055bd2ad26c27b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of elements in the map.  <a href="#a83b1ef9d30a009732055bd2ad26c27b1"></a><br/></td></tr>
<tr class="separator:a83b1ef9d30a009732055bd2ad26c27b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a42be2fd47c9cf178df18ebe2d74a36b1"><td class="memItemLeft" align="right" valign="top">const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a42be2fd47c9cf178df18ebe2d74a36b1">begin</a> () const </td></tr>
<tr class="memdesc:a42be2fd47c9cf178df18ebe2d74a36b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the first element of the hash map.  <a href="#a42be2fd47c9cf178df18ebe2d74a36b1"></a><br/></td></tr>
<tr class="separator:a42be2fd47c9cf178df18ebe2d74a36b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cdcad775e48da6951c86dedf58a40be"><td class="memItemLeft" align="right" valign="top">iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a0cdcad775e48da6951c86dedf58a40be">begin</a> ()</td></tr>
<tr class="memdesc:a0cdcad775e48da6951c86dedf58a40be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the first element of the hash map.  <a href="#a0cdcad775e48da6951c86dedf58a40be"></a><br/></td></tr>
<tr class="separator:a0cdcad775e48da6951c86dedf58a40be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a8251aea8ca2564f7cf06398f12a2c3da"><td class="memItemLeft" align="right" valign="top">const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a8251aea8ca2564f7cf06398f12a2c3da">end</a> () const </td></tr>
<tr class="memdesc:a8251aea8ca2564f7cf06398f12a2c3da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the one-after-the-last element of the hash map.  <a href="#a8251aea8ca2564f7cf06398f12a2c3da"></a><br/></td></tr>
<tr class="separator:a8251aea8ca2564f7cf06398f12a2c3da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc2e7c494575814d0c7b344be7980cbe"><td class="memItemLeft" align="right" valign="top">iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#abc2e7c494575814d0c7b344be7980cbe">end</a> ()</td></tr>
<tr class="memdesc:abc2e7c494575814d0c7b344be7980cbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the one-after-the-last element of the hash map.  <a href="#abc2e7c494575814d0c7b344be7980cbe"></a><br/></td></tr>
<tr class="separator:abc2e7c494575814d0c7b344be7980cbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:afd4acfe7f082737214003f86c65ea860"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#afd4acfe7f082737214003f86c65ea860">erase</a> (const key_type &amp;key)</td></tr>
<tr class="memdesc:afd4acfe7f082737214003f86c65ea860"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases the element with the given key, and returns the number of elements erased (either 0 or 1).  <a href="#afd4acfe7f082737214003f86c65ea860"></a><br/></td></tr>
<tr class="separator:afd4acfe7f082737214003f86c65ea860"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a305f2481fef3a5b8e2aaade661f96475"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#a305f2481fef3a5b8e2aaade661f96475">erase</a> (iterator it)</td></tr>
<tr class="memdesc:a305f2481fef3a5b8e2aaade661f96475"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases the element pointed to by the iterator.  <a href="#a305f2481fef3a5b8e2aaade661f96475"></a><br/></td></tr>
<tr class="separator:a305f2481fef3a5b8e2aaade661f96475"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af66c0680fdde6dbc1760934429957860"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#af66c0680fdde6dbc1760934429957860">erase</a> (const_iterator it)</td></tr>
<tr class="memdesc:af66c0680fdde6dbc1760934429957860"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases the element with the given key, and returns the number of elements erased (either 0 or 1).  <a href="#af66c0680fdde6dbc1760934429957860"></a><br/></td></tr>
<tr class="separator:af66c0680fdde6dbc1760934429957860"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ace8c159445aedecdf208349c7a9da0b5"><td class="memItemLeft" align="right" valign="top">iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#ace8c159445aedecdf208349c7a9da0b5">find</a> (const key_type &amp;key) const </td></tr>
<tr class="memdesc:ace8c159445aedecdf208349c7a9da0b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">If an element with the given key is present, the functions returns an iterator pointing at that element, otherwise an invalid iterator is returned.  <a href="#ace8c159445aedecdf208349c7a9da0b5"></a><br/></td></tr>
<tr class="separator:ace8c159445aedecdf208349c7a9da0b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaeb4bb24b69ffa9d693b91eeba1c6391"><td class="memItemLeft" align="right" valign="top">const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_map.html#aaeb4bb24b69ffa9d693b91eeba1c6391">find</a> (const key_type &amp;key) const </td></tr>
<tr class="memdesc:aaeb4bb24b69ffa9d693b91eeba1c6391"><td class="mdescLeft">&#160;</td><td class="mdescRight">If an element with the given key is present, the functions returns an iterator pointing at that element, otherwise an invalid iterator is returned.  <a href="#aaeb4bb24b69ffa9d693b91eeba1c6391"></a><br/></td></tr>
<tr class="separator:aaeb4bb24b69ffa9d693b91eeba1c6391"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8a013c04695c80c27bcb483928b45055"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxHashMap::wxHashMap </td>
          <td>(</td>
          <td class="paramtype">size_type&#160;</td>
          <td class="paramname"><em>size</em> = <code>10</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The size parameter is just a hint, the table will resize automatically to preserve performance. </p>

</div>
</div>
<a class="anchor" id="ae890044e2344b1838517a6f82b6a6ab7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxHashMap::wxHashMap </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_hash_map.html">wxHashMap</a> &amp;&#160;</td>
          <td class="paramname"><em>map</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy constructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a42be2fd47c9cf178df18ebe2d74a36b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const_iterator wxHashMap::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an iterator pointing at the first element of the hash map. </p>
<p>Please remember that hash maps do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="a0cdcad775e48da6951c86dedf58a40be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">iterator wxHashMap::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an iterator pointing at the first element of the hash map. </p>
<p>Please remember that hash maps do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="a58c9783bb91068a645a3c91a19c124fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHashMap::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes all elements from the hash map. </p>

</div>
</div>
<a class="anchor" id="a852c3250b25caaa8bd76327c3c9fe2a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type wxHashMap::count </td>
          <td>(</td>
          <td class="paramtype">const key_type &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Counts the number of elements with the given key present in the map. </p>
<p>This function returns only 0 or 1. </p>

</div>
</div>
<a class="anchor" id="a07153a28283f93a46faf0ccb340114dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxHashMap::empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns <span class="literal">true</span> if the hash map does not contain any elements, <span class="literal">false</span> otherwise. </p>

</div>
</div>
<a class="anchor" id="a8251aea8ca2564f7cf06398f12a2c3da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const_iterator wxHashMap::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an iterator pointing at the one-after-the-last element of the hash map. </p>
<p>Please remember that hash maps do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="abc2e7c494575814d0c7b344be7980cbe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">iterator wxHashMap::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an iterator pointing at the one-after-the-last element of the hash map. </p>
<p>Please remember that hash maps do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="afd4acfe7f082737214003f86c65ea860"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type wxHashMap::erase </td>
          <td>(</td>
          <td class="paramtype">const key_type &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Erases the element with the given key, and returns the number of elements erased (either 0 or 1). </p>

</div>
</div>
<a class="anchor" id="a305f2481fef3a5b8e2aaade661f96475"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHashMap::erase </td>
          <td>(</td>
          <td class="paramtype">iterator&#160;</td>
          <td class="paramname"><em>it</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Erases the element pointed to by the iterator. </p>
<p>After the deletion the iterator is no longer valid and must not be used. </p>

</div>
</div>
<a class="anchor" id="af66c0680fdde6dbc1760934429957860"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHashMap::erase </td>
          <td>(</td>
          <td class="paramtype">const_iterator&#160;</td>
          <td class="paramname"><em>it</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Erases the element with the given key, and returns the number of elements erased (either 0 or 1). </p>

</div>
</div>
<a class="anchor" id="ace8c159445aedecdf208349c7a9da0b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">iterator wxHashMap::find </td>
          <td>(</td>
          <td class="paramtype">const key_type &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If an element with the given key is present, the functions returns an iterator pointing at that element, otherwise an invalid iterator is returned. </p>
<div class="fragment"><div class="line">hashmap.find( non_existent_key ) == hashmap.end()</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="aaeb4bb24b69ffa9d693b91eeba1c6391"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const_iterator wxHashMap::find </td>
          <td>(</td>
          <td class="paramtype">const key_type &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If an element with the given key is present, the functions returns an iterator pointing at that element, otherwise an invalid iterator is returned. </p>
<div class="fragment"><div class="line">hashmap.find( non_existent_key ) == hashmap.end()</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ad88d3a3507b253cf53091e052b2746a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Insert_Result wxHashMap::insert </td>
          <td>(</td>
          <td class="paramtype">const value_type &amp;&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inserts the given value in the hash map. </p>
<p>The return value is equivalent to a </p>
<div class="fragment"><div class="line">std::pair&lt;wxHashMap::iterator, bool&gt; </div>
</div><!-- fragment --><p> The iterator points to the inserted element, the boolean value is <span class="literal">true</span> if <em>v</em> was actually inserted. </p>

</div>
</div>
<a class="anchor" id="ab93ea3e530789910f94a727243ae6863"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mapped_type wxHashMap::operator[] </td>
          <td>(</td>
          <td class="paramtype">const key_type &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use the key as an array subscript. </p>
<p>The only difference is that if the given key is not present in the hash map, an element with the default <code>value_type()</code> is inserted in the table. </p>

</div>
</div>
<a class="anchor" id="a83b1ef9d30a009732055bd2ad26c27b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type wxHashMap::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of elements in the map. </p>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:48 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>