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

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

https://bitbucket.org/pizzafactory/pf-gcc
HTML | 178 lines | 140 code | 38 blank | 0 comment | 0 complexity | 5acfdb2637d255111474c917d227ea15 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_update_policy 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_update_policy</tt> Interface</h1>
  14. <p>A sample list-update policy.</p>
  15. <p>This class serves to show the interface a list update
  16. functor 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/list_update_policy/sample_update_policy.hpp"><tt>sample_update_policy.hpp</tt></a></p>
  19. <h2><a name="link1" id="link1">Public Methods</a></h2>
  20. <h3><a name="link2" id="link2">Constructors, destructor, and
  21. related.</a></h3>
  22. <table class="c1" width="100%" border="1" summary="Methods">
  23. <tr>
  24. <td width="45%" align="left"><b>Method</b></td>
  25. <td width="55%" align="left"><b>Description</b></td>
  26. </tr>
  27. <tr>
  28. <td>
  29. <pre>
  30. sample_update_policy
  31. ()
  32. </pre>
  33. </td>
  34. <td>
  35. <p>Default constructor.</p>
  36. <p>Must be default constructable.</p>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td>
  41. <pre>
  42. sample_update_policy
  43. (<b>const</b> sample_update_policy &amp;other)
  44. </pre>
  45. </td>
  46. <td>
  47. <p>Copy constructor.</p>
  48. <p>Must be copy constructable.</p>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td>
  53. <pre>
  54. <b>inline</b> <b>void</b>
  55. swap
  56. (sample_update_policy &amp;other)
  57. </pre>
  58. </td>
  59. <td>
  60. <p>Swaps content.</p>
  61. <p>Must be swappable (if there is such a word).</p>
  62. </td>
  63. </tr>
  64. </table>
  65. <h2><a name="link3" id="link3">Protected Types and
  66. Constants</a></h2>
  67. <h3><a name="link4" id="link4">Metadata definitions.</a></h3>
  68. <table class="c1" width="100%" border="1" summary="Types">
  69. <tr>
  70. <td width="30%" align="left"><b>Type</b></td>
  71. <td width="55%" align="left"><b>Definition</b></td>
  72. <td width="15%" align="left"><b>Description</b></td>
  73. </tr>
  74. <tr>
  75. <td>
  76. <pre>
  77. <a name="metadata_type2849297114" id=
  78. "metadata_type2849297114">metadata_type</a>
  79. </pre>
  80. </td>
  81. <td>
  82. <pre>
  83. Some metadata type.
  84. </pre>
  85. </td>
  86. <td>
  87. <p>Metadata on which this functor operates.</p>
  88. <p>The <tt><b>class</b></tt> must declare the metadata
  89. type on which it operates; the list-update based
  90. containers will append to each node an object of this
  91. type.</p>
  92. </td>
  93. </tr>
  94. </table>
  95. <h2><a name="link5" id="link5">Protected Methods</a></h2>
  96. <h3><a name="link6" id="link6">Metadata operations.</a></h3>
  97. <table class="c1" width="100%" border="1" summary="Methods">
  98. <tr>
  99. <td width="45%" align="left"><b>Method</b></td>
  100. <td width="55%" align="left"><b>Description</b></td>
  101. </tr>
  102. <tr>
  103. <td>
  104. <pre>
  105. <a href="#metadata_type2849297114"><tt>metadata_type</tt></a>
  106. <b>operator</b>()
  107. () <b>const</b>
  108. </pre>
  109. </td>
  110. <td>
  111. <p>Creates a metadata object.</p>
  112. <p>A list-update based container object will call this
  113. method to create a metadata type when a node is
  114. created.</p>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td>
  119. <pre>
  120. <b>bool</b>
  121. <b>operator</b>()
  122. (metadata_reference r_data) <b>const</b>
  123. </pre>
  124. </td>
  125. <td>
  126. <p>Decides whether a metadata object should be moved to
  127. the front of the list. A list-update based containers
  128. object will call this method to decide whether to move a
  129. node to the front of the list. The method should return
  130. <tt><b>true</b></tt> if the node should be moved to the
  131. front of the list.</p>
  132. <p><tt>metadata_reference</tt> is a reference to a
  133. <a href=
  134. "#metadata_type2849297114"><tt>metadata_type</tt></a>.</p>
  135. </td>
  136. </tr>
  137. </table>
  138. </div>
  139. </body>
  140. </html>