1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <meta name="generator" content=
7 "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
9 <title>sample_resize_trigger Interface</title>
10 <meta http-equiv="Content-Type" content=
11 "text/html; charset=us-ascii" />
16 <h1><tt>sample_resize_trigger</tt> Interface</h1>
18 <p>A sample resize trigger policy.</p>
20 <p>This class serves to show the interface a trigger policy
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>
27 <h2><a name="link1" id="link1">Public Types and
30 <h3><a name="link2" id="link2">General definitions.</a></h3>
32 <table class="c1" width="100%" border="1" summary="Types">
34 <td width="30%" align="left"><b>Type</b></td>
36 <td width="55%" align="left"><b>Definition</b></td>
38 <td width="15%" align="left"><b>Description</b></td>
44 <a name="size_type55424436" id="size_type55424436">size_type</a>
60 <h2><a name="link3" id="link3">Public Methods</a></h2>
62 <h3><a name="link4" id="link4">Constructors, destructor, and
65 <table class="c1" width="100%" border="1" summary="Methods">
67 <td width="45%" align="left"><b>Method</b></td>
69 <td width="55%" align="left"><b>Description</b></td>
81 <p>Default constructor.</p>
83 <p>Must be default constructable.</p>
91 (<b>const</b> sample_resize_trigger &other)
96 <p>Copy constructor.</p>
98 <p>Must be copy constructable.</p>
105 <b>inline</b> <b>void</b>
107 (sample_resize_trigger &other)
112 <p>Swaps content.</p>
114 <p>Must be swappable (if there is such a word).</p>
119 <h2><a name="link5" id="link5">Protected Methods</a></h2>
121 <h3><a name="link6" id="link6">Insert search
122 notifications.</a></h3>
124 <p>Notifications called during an insert operation.</p>
126 <table class="c1" width="100%" border="1" summary="Methods">
128 <td width="45%" align="left"><b>Method</b></td>
130 <td width="55%" align="left"><b>Description</b></td>
136 <b>inline</b> <b>void</b>
137 notify_insert_search_start
143 <p>Notifies a search started.</p>
150 <b>inline</b> <b>void</b>
151 notify_insert_search_collision
157 <p>Notifies a search encountered a collision.</p>
164 <b>inline</b> <b>void</b>
165 notify_insert_search_end
171 <p>Notifies a search ended.</p>
176 <h3><a name="link7" id="link7">Find search
177 notifications.</a></h3>
179 <p>Notifications called during a find operation.</p>
181 <table class="c1" width="100%" border="1" summary="Methods">
183 <td width="45%" align="left"><b>Method</b></td>
185 <td width="55%" align="left"><b>Description</b></td>
191 <b>inline</b> <b>void</b>
192 notify_find_search_start
198 <p>Notifies a search started.</p>
205 <b>inline</b> <b>void</b>
206 notify_find_search_collision
212 <p>Notifies a search encountered a collision.</p>
219 <b>inline</b> <b>void</b>
220 notify_find_search_end
226 <p>Notifies a search ended.</p>
231 <h3><a name="link8" id="link8">Erase search
232 notifications.</a></h3>
234 <p>Notifications called during an insert operation.</p>
236 <table class="c1" width="100%" border="1" summary="Methods">
238 <td width="45%" align="left"><b>Method</b></td>
240 <td width="55%" align="left"><b>Description</b></td>
246 <b>inline</b> <b>void</b>
247 notify_erase_search_start
253 <p>Notifies a search started.</p>
260 <b>inline</b> <b>void</b>
261 notify_erase_search_collision
267 <p>Notifies a search encountered a collision.</p>
274 <b>inline</b> <b>void</b>
275 notify_erase_search_end
281 <p>Notifies a search ended.</p>
286 <h3><a name="link9" id="link9">Content change
287 notifications.</a></h3>
289 <p>Notifications called when the content of the table changes
290 in a way that can affect the resize policy.</p>
292 <table class="c1" width="100%" border="1" summary="Methods">
294 <td width="45%" align="left"><b>Method</b></td>
296 <td width="55%" align="left"><b>Description</b></td>
302 <b>inline</b> <b>void</b>
304 (<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
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>
318 <b>inline</b> <b>void</b>
320 (<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
325 <p>Notifies an element was erased.</p>
339 <p>Notifies the table was cleared.</p>
344 <h3><a name="link10" id="link10">Size change
345 notifications.</a></h3>
347 <p>Notifications called when the table changes size.</p>
349 <table class="c1" width="100%" border="1" summary="Methods">
351 <td width="45%" align="left"><b>Method</b></td>
353 <td width="55%" align="left"><b>Description</b></td>
361 (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
366 <p>Notifies the table was resized as a result of this
367 object's signifying that a resize is needed.</p>
375 notify_externally_resized
376 (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
381 <p>Notifies the table was resized externally.</p>
386 <h3><a name="link11" id="link11">Queries.</a></h3>
388 <p>Called to query whether/how to resize.</p>
390 <table class="c1" width="100%" border="1" summary="Methods">
392 <td width="45%" align="left"><b>Method</b></td>
394 <td width="55%" align="left"><b>Description</b></td>
400 <b>inline</b> <b>bool</b>
407 <p>Queries whether a resize is needed.</p>
414 <b>inline</b> <b>bool</b>
416 (<a href="#size_type55424436"><tt>size_type</tt></a> size,
418 "#size_type55424436"><tt>size_type</tt></a> num_entries) <b>const</b>
423 <p>Queries whether a grow is needed.</p>
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>
434 <h2><a name="link12" id="link12">Private Methods</a></h2>
436 <h3><a name="link13" id="link13">Overrides.</a></h3>
438 <table class="c1" width="100%" border="1" summary="Methods">
440 <td width="45%" align="left"><b>Method</b></td>
442 <td width="55%" align="left"><b>Description</b></td>
448 <b>virtual</b> <b>void</b>
450 (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
455 <p>Resizes to <span class=
456 "c1"><tt>new_size</tt></span>.</p>