PageRenderTime 29ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/libstdc++-v3/doc/html/ext/pb_ds/sample_resize_trigger.html

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