File: classwx_hash_set.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 (522 lines) | stat: -rw-r--r-- 31,485 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
<!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: wxHashSet 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_set-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxHashSet 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/hashset.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 set class, whose interface is a subset of the interface of STL containers. </p>
<p>The interface is similar to std::tr1::hash_set or std::set classes but notice that, unlike std::set, the contents of a hash set is not sorted.</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">// same, with MyClass* keys (only uses pointer equality!)</span></div>
<div class="line">WX_DECLARE_HASH_SET( MyClass*, wxPointerHash, wxPointerEqual, MySet1 );</div>
<div class="line"><span class="comment">// same, with int keys</span></div>
<div class="line">WX_DECLARE_HASH_SET( <span class="keywordtype">int</span>, wxIntegerHash, wxIntegerEqual, MySet2 );</div>
<div class="line"><span class="comment">// declare a hash set with string keys</span></div>
<div class="line">WX_DECLARE_HASH_SET( <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>, wxStringHash, wxStringEqual, MySet3 );</div>
<div class="line"></div>
<div class="line">MySet1 h1;</div>
<div class="line">MySet2 h1;</div>
<div class="line">MySet3 h3;</div>
<div class="line"></div>
<div class="line"><span class="comment">// store and retrieve values</span></div>
<div class="line">h1.insert( <span class="keyword">new</span> MyClass( 1 ) );</div>
<div class="line"></div>
<div class="line">h3.insert( <span class="stringliteral">&quot;foo&quot;</span> );</div>
<div class="line">h3.insert( <span class="stringliteral">&quot;bar&quot;</span> );</div>
<div class="line">h3.insert( <span class="stringliteral">&quot;baz&quot;</span> );</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> size = h3.size(); <span class="comment">// now is three</span></div>
<div class="line"><span class="keywordtype">bool</span> has_foo = h3.find( <span class="stringliteral">&quot;foo&quot;</span> ) != h3.end();</div>
<div class="line"></div>
<div class="line">h3.insert( <span class="stringliteral">&quot;bar&quot;</span> ); <span class="comment">// still has size three</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">MySet3::iterator it;</div>
<div class="line"><span class="keywordflow">for</span>( it = h3.begin(); it != h3.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;</div>
<div class="line">    <span class="comment">// do something useful with key</span></div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="hashset_declaringnew"></a>
Declaring new hash set types</h1>
<div class="fragment"><div class="line">WX_DECLARE_HASH_SET( KEY_T,      <span class="comment">// type of the keys</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: wxIntegerHash for integer types ( int, long, short, and their unsigned counterparts ), wxStringHash 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 wxPointerHash for any kind of pointer. Similarly three equality predicates: wxIntegerEqual, wxStringEqual, wxPointerEqual are provided. Using this you could declare a hash set using int values like this:</p>
<div class="fragment"><div class="line">WX_DECLARE_HASH_SET( <span class="keywordtype">int</span>,</div>
<div class="line">                    wxIntegerHash,</div>
<div class="line">                    wxIntegerEqual,</div>
<div class="line">                    MySet );</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_SET( MyKey,      <span class="comment">// type of the keys</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="hashset_types"></a>
Types</h1>
<p>In the documentation below you should replace <a class="el" href="classwx_hash_set.html" title="This is a simple, type-safe, and reasonably efficient hash set class, whose interface is a subset of ...">wxHashSet</a> with the name you used in the class declaration.</p>
<ul>
<li>wxHashSet::key_type: Type of the hash keys</li>
<li>wxHashSet::mapped_type: Type of hash keys</li>
<li>wxHashSet::value_type: Type of hash keys</li>
<li>wxHashSet::iterator: Used to enumerate all the elements in a hash set; it is similar to a value_type*</li>
<li>wxHashSet::const_iterator: Used to enumerate all the elements in a constant hash set; it is similar to a const value_type*</li>
<li>wxHashSet::size_type: Used for sizes</li>
<li>wxHashSet::Insert_Result: The return value for <a class="el" href="classwx_hash_set.html#ad8c4392cba0a4b1f903b9cfe788180da" title="Inserts the given value in the hash set.">insert()</a></li>
</ul>
<h1><a class="anchor" id="hashset_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 to access the value of the element pointed to. Hash sets provide forward only iterators, this means that you can't use &ndash;it, it + 3, it1 - it2.</p>
<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:aac5dee2aa36123c56c88d8b40e52faca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#aac5dee2aa36123c56c88d8b40e52faca">wxHashSet</a> (size_type <a class="el" href="classwx_hash_set.html#a31c570890219139fafc7b8b62c29db8a">size</a>=10)</td></tr>
<tr class="memdesc:aac5dee2aa36123c56c88d8b40e52faca"><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="#aac5dee2aa36123c56c88d8b40e52faca"></a><br/></td></tr>
<tr class="separator:aac5dee2aa36123c56c88d8b40e52faca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9819f9680e3450479cf7be1d832fd9e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#aa9819f9680e3450479cf7be1d832fd9e">wxHashSet</a> (const <a class="el" href="classwx_hash_set.html">wxHashSet</a> &amp;set)</td></tr>
<tr class="memdesc:aa9819f9680e3450479cf7be1d832fd9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#aa9819f9680e3450479cf7be1d832fd9e"></a><br/></td></tr>
<tr class="separator:aa9819f9680e3450479cf7be1d832fd9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81dee12cfec562dcd8ebf14b77bbecf5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a81dee12cfec562dcd8ebf14b77bbecf5">clear</a> ()</td></tr>
<tr class="memdesc:a81dee12cfec562dcd8ebf14b77bbecf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all elements from the hash set.  <a href="#a81dee12cfec562dcd8ebf14b77bbecf5"></a><br/></td></tr>
<tr class="separator:a81dee12cfec562dcd8ebf14b77bbecf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae102adc16fa54b4aba2eefbb355c228a"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#ae102adc16fa54b4aba2eefbb355c228a">count</a> (const key_type &amp;key) const </td></tr>
<tr class="memdesc:ae102adc16fa54b4aba2eefbb355c228a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Counts the number of elements with the given key present in the set.  <a href="#ae102adc16fa54b4aba2eefbb355c228a"></a><br/></td></tr>
<tr class="separator:ae102adc16fa54b4aba2eefbb355c228a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fe7d3968606d33a1dca3a75b47ec827"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a7fe7d3968606d33a1dca3a75b47ec827">empty</a> () const </td></tr>
<tr class="memdesc:a7fe7d3968606d33a1dca3a75b47ec827"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <span class="literal">true</span> if the hash set does not contain any elements, <span class="literal">false</span> otherwise.  <a href="#a7fe7d3968606d33a1dca3a75b47ec827"></a><br/></td></tr>
<tr class="separator:a7fe7d3968606d33a1dca3a75b47ec827"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c54e60d26122a8eae9c3dfe12446e2f"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a1c54e60d26122a8eae9c3dfe12446e2f">erase</a> (const key_type &amp;key)</td></tr>
<tr class="memdesc:a1c54e60d26122a8eae9c3dfe12446e2f"><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="#a1c54e60d26122a8eae9c3dfe12446e2f"></a><br/></td></tr>
<tr class="separator:a1c54e60d26122a8eae9c3dfe12446e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8c4392cba0a4b1f903b9cfe788180da"><td class="memItemLeft" align="right" valign="top">Insert_Result&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#ad8c4392cba0a4b1f903b9cfe788180da">insert</a> (const value_type &amp;v)</td></tr>
<tr class="memdesc:ad8c4392cba0a4b1f903b9cfe788180da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts the given value in the hash set.  <a href="#ad8c4392cba0a4b1f903b9cfe788180da"></a><br/></td></tr>
<tr class="separator:ad8c4392cba0a4b1f903b9cfe788180da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31c570890219139fafc7b8b62c29db8a"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a31c570890219139fafc7b8b62c29db8a">size</a> () const </td></tr>
<tr class="memdesc:a31c570890219139fafc7b8b62c29db8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of elements in the set.  <a href="#a31c570890219139fafc7b8b62c29db8a"></a><br/></td></tr>
<tr class="separator:a31c570890219139fafc7b8b62c29db8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:af71a133692e70c51624551d353094263"><td class="memItemLeft" align="right" valign="top">const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#af71a133692e70c51624551d353094263">begin</a> () const </td></tr>
<tr class="memdesc:af71a133692e70c51624551d353094263"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the first element of the hash set.  <a href="#af71a133692e70c51624551d353094263"></a><br/></td></tr>
<tr class="separator:af71a133692e70c51624551d353094263"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a215be550553feb0f0dc2da770c3a5ff7"><td class="memItemLeft" align="right" valign="top">iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a215be550553feb0f0dc2da770c3a5ff7">begin</a> ()</td></tr>
<tr class="memdesc:a215be550553feb0f0dc2da770c3a5ff7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the first element of the hash set.  <a href="#a215be550553feb0f0dc2da770c3a5ff7"></a><br/></td></tr>
<tr class="separator:a215be550553feb0f0dc2da770c3a5ff7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a7f9fc908c787551edaca580b6364d573"><td class="memItemLeft" align="right" valign="top">const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a7f9fc908c787551edaca580b6364d573">end</a> () const </td></tr>
<tr class="memdesc:a7f9fc908c787551edaca580b6364d573"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the one-after-the-last element of the hash set.  <a href="#a7f9fc908c787551edaca580b6364d573"></a><br/></td></tr>
<tr class="separator:a7f9fc908c787551edaca580b6364d573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64e72e9f58a5f33fd24aa2e3ca3b3b00"><td class="memItemLeft" align="right" valign="top">iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a64e72e9f58a5f33fd24aa2e3ca3b3b00">end</a> ()</td></tr>
<tr class="memdesc:a64e72e9f58a5f33fd24aa2e3ca3b3b00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator pointing at the one-after-the-last element of the hash set.  <a href="#a64e72e9f58a5f33fd24aa2e3ca3b3b00"></a><br/></td></tr>
<tr class="separator:a64e72e9f58a5f33fd24aa2e3ca3b3b00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a0a2addc247305cffdc9bea89fe17ffb9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a0a2addc247305cffdc9bea89fe17ffb9">erase</a> (iterator it)</td></tr>
<tr class="memdesc:a0a2addc247305cffdc9bea89fe17ffb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases the element pointed to by the iterator.  <a href="#a0a2addc247305cffdc9bea89fe17ffb9"></a><br/></td></tr>
<tr class="separator:a0a2addc247305cffdc9bea89fe17ffb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f289bb421d517896f400176ba539fe8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a2f289bb421d517896f400176ba539fe8">erase</a> (const_iterator it)</td></tr>
<tr class="memdesc:a2f289bb421d517896f400176ba539fe8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases the element pointed to by the iterator.  <a href="#a2f289bb421d517896f400176ba539fe8"></a><br/></td></tr>
<tr class="separator:a2f289bb421d517896f400176ba539fe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a64240455373cd5d418b2c1998f86aa33"><td class="memItemLeft" align="right" valign="top">iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#a64240455373cd5d418b2c1998f86aa33">find</a> (const key_type &amp;key) const </td></tr>
<tr class="memdesc:a64240455373cd5d418b2c1998f86aa33"><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="#a64240455373cd5d418b2c1998f86aa33"></a><br/></td></tr>
<tr class="separator:a64240455373cd5d418b2c1998f86aa33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb4b274b7d8c9fbca9e4453f0971fe12"><td class="memItemLeft" align="right" valign="top">const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_hash_set.html#adb4b274b7d8c9fbca9e4453f0971fe12">find</a> (const key_type &amp;key) const </td></tr>
<tr class="memdesc:adb4b274b7d8c9fbca9e4453f0971fe12"><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="#adb4b274b7d8c9fbca9e4453f0971fe12"></a><br/></td></tr>
<tr class="separator:adb4b274b7d8c9fbca9e4453f0971fe12"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aac5dee2aa36123c56c88d8b40e52faca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxHashSet::wxHashSet </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="aa9819f9680e3450479cf7be1d832fd9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxHashSet::wxHashSet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_hash_set.html">wxHashSet</a> &amp;&#160;</td>
          <td class="paramname"><em>set</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="af71a133692e70c51624551d353094263"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const_iterator wxHashSet::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 set. </p>
<p>Please remember that hash sets do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="a215be550553feb0f0dc2da770c3a5ff7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">iterator wxHashSet::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 set. </p>
<p>Please remember that hash sets do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="a81dee12cfec562dcd8ebf14b77bbecf5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHashSet::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 set. </p>

</div>
</div>
<a class="anchor" id="ae102adc16fa54b4aba2eefbb355c228a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type wxHashSet::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 set. </p>
<p>This function returns only 0 or 1. </p>

</div>
</div>
<a class="anchor" id="a7fe7d3968606d33a1dca3a75b47ec827"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxHashSet::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 set does not contain any elements, <span class="literal">false</span> otherwise. </p>

</div>
</div>
<a class="anchor" id="a7f9fc908c787551edaca580b6364d573"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const_iterator wxHashSet::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 set. </p>
<p>Please remember that hash sets do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="a64e72e9f58a5f33fd24aa2e3ca3b3b00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">iterator wxHashSet::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 set. </p>
<p>Please remember that hash sets do not guarantee ordering. </p>

</div>
</div>
<a class="anchor" id="a1c54e60d26122a8eae9c3dfe12446e2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type wxHashSet::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="a0a2addc247305cffdc9bea89fe17ffb9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHashSet::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="a2f289bb421d517896f400176ba539fe8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHashSet::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 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="a64240455373cd5d418b2c1998f86aa33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">iterator wxHashSet::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>
<p>i.e. </p>
<div class="fragment"><div class="line">hashset.find( non_existent_key ) == hashset.end()</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="adb4b274b7d8c9fbca9e4453f0971fe12"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const_iterator wxHashSet::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>
<p>i.e. </p>
<div class="fragment"><div class="line">hashset.find( non_existent_key ) == hashset.end()</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ad8c4392cba0a4b1f903b9cfe788180da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Insert_Result wxHashSet::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 set. </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="a31c570890219139fafc7b8b62c29db8a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type wxHashSet::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 set. </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>