1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <meta name="generator" content=
7  "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
8
9  <title>sample_resize_trigger Interface</title>
10  <meta http-equiv="Content-Type" content=
11  "text/html; charset=us-ascii" />
12  </head>
13
14<body>
15  <div id="page">
16    <h1><tt>sample_resize_trigger</tt> Interface</h1>
17
18    <p>A sample resize trigger policy.</p>
19
20    <p>This class serves to show the interface a trigger policy
21    needs to support.</p>
22
23    <p>Defined in: <a href=
24    "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp"><tt>
25    sample_resize_trigger.hpp</tt></a></p>
26
27    <h2><a name="link1" id="link1">Public Types and
28    Constants</a></h2>
29
30    <h3><a name="link2" id="link2">General definitions.</a></h3>
31
32    <table class="c1" width="100%" border="1" summary="Types">
33      <tr>
34        <td width="30%" align="left"><b>Type</b></td>
35
36        <td width="55%" align="left"><b>Definition</b></td>
37
38        <td width="15%" align="left"><b>Description</b></td>
39      </tr>
40
41      <tr>
42        <td>
43          <pre>
44<a name="size_type55424436" id="size_type55424436">size_type</a>
45</pre>
46        </td>
47
48        <td>
49          <pre>
50size_t, e.g.
51</pre>
52        </td>
53
54        <td>
55          <p>Size type.</p>
56        </td>
57      </tr>
58    </table>
59
60    <h2><a name="link3" id="link3">Public Methods</a></h2>
61
62    <h3><a name="link4" id="link4">Constructors, destructor, and
63    related.</a></h3>
64
65    <table class="c1" width="100%" border="1" summary="Methods">
66      <tr>
67        <td width="45%" align="left"><b>Method</b></td>
68
69        <td width="55%" align="left"><b>Description</b></td>
70      </tr>
71
72      <tr>
73        <td>
74          <pre>
75  sample_resize_trigger
76  ()
77</pre>
78        </td>
79
80        <td>
81          <p>Default constructor.</p>
82
83          <p>Must be default constructable.</p>
84        </td>
85      </tr>
86
87      <tr>
88        <td>
89          <pre>
90  sample_range_hashing
91  (<b>const</b> sample_resize_trigger &amp;other)
92</pre>
93        </td>
94
95        <td>
96          <p>Copy constructor.</p>
97
98          <p>Must be copy constructable.</p>
99        </td>
100      </tr>
101
102      <tr>
103        <td>
104          <pre>
105<b>inline</b> <b>void</b>
106  swap
107  (sample_resize_trigger &amp;other)
108</pre>
109        </td>
110
111        <td>
112          <p>Swaps content.</p>
113
114          <p>Must be swappable (if there is such a word).</p>
115        </td>
116      </tr>
117    </table>
118
119    <h2><a name="link5" id="link5">Protected Methods</a></h2>
120
121    <h3><a name="link6" id="link6">Insert search
122    notifications.</a></h3>
123
124    <p>Notifications called during an insert operation.</p>
125
126    <table class="c1" width="100%" border="1" summary="Methods">
127      <tr>
128        <td width="45%" align="left"><b>Method</b></td>
129
130        <td width="55%" align="left"><b>Description</b></td>
131      </tr>
132
133      <tr>
134        <td>
135          <pre>
136<b>inline</b> <b>void</b>
137  notify_insert_search_start
138  ()
139</pre>
140        </td>
141
142        <td>
143          <p>Notifies a search started.</p>
144        </td>
145      </tr>
146
147      <tr>
148        <td>
149          <pre>
150<b>inline</b> <b>void</b>
151  notify_insert_search_collision
152  ()
153</pre>
154        </td>
155
156        <td>
157          <p>Notifies a search encountered a collision.</p>
158        </td>
159      </tr>
160
161      <tr>
162        <td>
163          <pre>
164<b>inline</b> <b>void</b>
165  notify_insert_search_end
166  ()
167</pre>
168        </td>
169
170        <td>
171          <p>Notifies a search ended.</p>
172        </td>
173      </tr>
174    </table>
175
176    <h3><a name="link7" id="link7">Find search
177    notifications.</a></h3>
178
179    <p>Notifications called during a find operation.</p>
180
181    <table class="c1" width="100%" border="1" summary="Methods">
182      <tr>
183        <td width="45%" align="left"><b>Method</b></td>
184
185        <td width="55%" align="left"><b>Description</b></td>
186      </tr>
187
188      <tr>
189        <td>
190          <pre>
191<b>inline</b> <b>void</b>
192  notify_find_search_start
193  ()
194</pre>
195        </td>
196
197        <td>
198          <p>Notifies a search started.</p>
199        </td>
200      </tr>
201
202      <tr>
203        <td>
204          <pre>
205<b>inline</b> <b>void</b>
206  notify_find_search_collision
207  ()
208</pre>
209        </td>
210
211        <td>
212          <p>Notifies a search encountered a collision.</p>
213        </td>
214      </tr>
215
216      <tr>
217        <td>
218          <pre>
219<b>inline</b> <b>void</b>
220  notify_find_search_end
221  ()
222</pre>
223        </td>
224
225        <td>
226          <p>Notifies a search ended.</p>
227        </td>
228      </tr>
229    </table>
230
231    <h3><a name="link8" id="link8">Erase search
232    notifications.</a></h3>
233
234    <p>Notifications called during an insert operation.</p>
235
236    <table class="c1" width="100%" border="1" summary="Methods">
237      <tr>
238        <td width="45%" align="left"><b>Method</b></td>
239
240        <td width="55%" align="left"><b>Description</b></td>
241      </tr>
242
243      <tr>
244        <td>
245          <pre>
246<b>inline</b> <b>void</b>
247  notify_erase_search_start
248  ()
249</pre>
250        </td>
251
252        <td>
253          <p>Notifies a search started.</p>
254        </td>
255      </tr>
256
257      <tr>
258        <td>
259          <pre>
260<b>inline</b> <b>void</b>
261  notify_erase_search_collision
262  ()
263</pre>
264        </td>
265
266        <td>
267          <p>Notifies a search encountered a collision.</p>
268        </td>
269      </tr>
270
271      <tr>
272        <td>
273          <pre>
274<b>inline</b> <b>void</b>
275  notify_erase_search_end
276  ()
277</pre>
278        </td>
279
280        <td>
281          <p>Notifies a search ended.</p>
282        </td>
283      </tr>
284    </table>
285
286    <h3><a name="link9" id="link9">Content change
287    notifications.</a></h3>
288
289    <p>Notifications called when the content of the table changes
290    in a way that can affect the resize policy.</p>
291
292    <table class="c1" width="100%" border="1" summary="Methods">
293      <tr>
294        <td width="45%" align="left"><b>Method</b></td>
295
296        <td width="55%" align="left"><b>Description</b></td>
297      </tr>
298
299      <tr>
300        <td>
301          <pre>
302<b>inline</b> <b>void</b>
303  notify_inserted
304  (<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
305</pre>
306        </td>
307
308        <td>
309          <p>Notifies an element was inserted. the total number of
310          entries in the table is <span class=
311          "c1"><tt>num_entries</tt></span>.</p>
312        </td>
313      </tr>
314
315      <tr>
316        <td>
317          <pre>
318<b>inline</b> <b>void</b>
319  notify_erased
320  (<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
321</pre>
322        </td>
323
324        <td>
325          <p>Notifies an element was erased.</p>
326        </td>
327      </tr>
328
329      <tr>
330        <td>
331          <pre>
332<b>void</b> 
333  notify_cleared
334  ()
335</pre>
336        </td>
337
338        <td>
339          <p>Notifies the table was cleared.</p>
340        </td>
341      </tr>
342    </table>
343
344    <h3><a name="link10" id="link10">Size change
345    notifications.</a></h3>
346
347    <p>Notifications called when the table changes size.</p>
348
349    <table class="c1" width="100%" border="1" summary="Methods">
350      <tr>
351        <td width="45%" align="left"><b>Method</b></td>
352
353        <td width="55%" align="left"><b>Description</b></td>
354      </tr>
355
356      <tr>
357        <td>
358          <pre>
359<b>void</b>
360  notify_resized
361  (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
362</pre>
363        </td>
364
365        <td>
366          <p>Notifies the table was resized as a result of this
367          object's signifying that a resize is needed.</p>
368        </td>
369      </tr>
370
371      <tr>
372        <td>
373          <pre>
374<b>void</b>
375  notify_externally_resized
376  (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
377</pre>
378        </td>
379
380        <td>
381          <p>Notifies the table was resized externally.</p>
382        </td>
383      </tr>
384    </table>
385
386    <h3><a name="link11" id="link11">Queries.</a></h3>
387
388    <p>Called to query whether/how to resize.</p>
389
390    <table class="c1" width="100%" border="1" summary="Methods">
391      <tr>
392        <td width="45%" align="left"><b>Method</b></td>
393
394        <td width="55%" align="left"><b>Description</b></td>
395      </tr>
396
397      <tr>
398        <td>
399          <pre>
400<b>inline</b> <b>bool</b> 
401  is_resize_needed
402  () <b>const</b>
403</pre>
404        </td>
405
406        <td>
407          <p>Queries whether a resize is needed.</p>
408        </td>
409      </tr>
410
411      <tr>
412        <td>
413          <pre>
414<b>inline</b> <b>bool</b>
415  is_grow_needed
416  (<a href="#size_type55424436"><tt>size_type</tt></a> size, 
417    <a href=
418"#size_type55424436"><tt>size_type</tt></a> num_entries) <b>const</b>
419</pre>
420        </td>
421
422        <td>
423          <p>Queries whether a grow is needed.</p>
424
425          <p>This method is called only if this object indicated
426          resize is needed. The actual <span class=
427          "c1"><tt>size</tt></span> of the table is <span class=
428          "c1"><tt>size</tt></span>, and the number of entries in
429          it is <span class="c1"><tt>num_entries</tt></span>.</p>
430        </td>
431      </tr>
432    </table>
433
434    <h2><a name="link12" id="link12">Private Methods</a></h2>
435
436    <h3><a name="link13" id="link13">Overrides.</a></h3>
437
438    <table class="c1" width="100%" border="1" summary="Methods">
439      <tr>
440        <td width="45%" align="left"><b>Method</b></td>
441
442        <td width="55%" align="left"><b>Description</b></td>
443      </tr>
444
445      <tr>
446        <td>
447          <pre>
448<b>virtual</b> <b>void</b>
449  do_resize
450  (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
451</pre>
452        </td>
453
454        <td>
455          <p>Resizes to <span class=
456          "c1"><tt>new_size</tt></span>.</p>
457        </td>
458      </tr>
459    </table>
460  </div>
461</body>
462</html>
463