Merge -r 127928:132243 from trunk
[official-gcc.git] / libstdc++-v3 / doc / html / ext / pb_ds / sample_update_policy.html
blobf671bcdc25a858456b503438b83de95646330797
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">
5 <head>
6 <meta name="generator" content=
7 "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
9 <title>sample_update_policy Interface</title>
10 <meta http-equiv="Content-Type" content=
11 "text/html; charset=us-ascii" />
12 </head>
14 <body>
15 <div id="page">
16 <h1><tt>sample_update_policy</tt> Interface</h1>
18 <p>A sample list-update policy.</p>
20 <p>This class serves to show the interface a list update
21 functor needs to support.</p>
23 <p>Defined in: <a href=
24 "../../../../include/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp"><tt>sample_update_policy.hpp</tt></a></p>
26 <h2><a name="link1" id="link1">Public Methods</a></h2>
28 <h3><a name="link2" id="link2">Constructors, destructor, and
29 related.</a></h3>
31 <table class="c1" width="100%" border="1" summary="Methods">
32 <tr>
33 <td width="45%" align="left"><b>Method</b></td>
35 <td width="55%" align="left"><b>Description</b></td>
36 </tr>
38 <tr>
39 <td>
40 <pre>
41 sample_update_policy
43 </pre>
44 </td>
46 <td>
47 <p>Default constructor.</p>
49 <p>Must be default constructable.</p>
50 </td>
51 </tr>
53 <tr>
54 <td>
55 <pre>
56 sample_update_policy
57 (<b>const</b> sample_update_policy &amp;other)
58 </pre>
59 </td>
61 <td>
62 <p>Copy constructor.</p>
64 <p>Must be copy constructable.</p>
65 </td>
66 </tr>
68 <tr>
69 <td>
70 <pre>
71 <b>inline</b> <b>void</b>
72 swap
73 (sample_update_policy &amp;other)
74 </pre>
75 </td>
77 <td>
78 <p>Swaps content.</p>
80 <p>Must be swappable (if there is such a word).</p>
81 </td>
82 </tr>
83 </table>
85 <h2><a name="link3" id="link3">Protected Types and
86 Constants</a></h2>
88 <h3><a name="link4" id="link4">Metadata definitions.</a></h3>
90 <table class="c1" width="100%" border="1" summary="Types">
91 <tr>
92 <td width="30%" align="left"><b>Type</b></td>
94 <td width="55%" align="left"><b>Definition</b></td>
96 <td width="15%" align="left"><b>Description</b></td>
97 </tr>
99 <tr>
100 <td>
101 <pre>
102 <a name="metadata_type2849297114" id=
103 "metadata_type2849297114">metadata_type</a>
104 </pre>
105 </td>
107 <td>
108 <pre>
109 Some metadata type.
110 </pre>
111 </td>
113 <td>
114 <p>Metadata on which this functor operates.</p>
116 <p>The <tt><b>class</b></tt> must declare the metadata
117 type on which it operates; the list-update based
118 containers will append to each node an object of this
119 type.</p>
120 </td>
121 </tr>
122 </table>
124 <h2><a name="link5" id="link5">Protected Methods</a></h2>
126 <h3><a name="link6" id="link6">Metadata operations.</a></h3>
128 <table class="c1" width="100%" border="1" summary="Methods">
129 <tr>
130 <td width="45%" align="left"><b>Method</b></td>
132 <td width="55%" align="left"><b>Description</b></td>
133 </tr>
135 <tr>
136 <td>
137 <pre>
138 <a href="#metadata_type2849297114"><tt>metadata_type</tt></a>
139 <b>operator</b>()
140 () <b>const</b>
141 </pre>
142 </td>
144 <td>
145 <p>Creates a metadata object.</p>
147 <p>A list-update based container object will call this
148 method to create a metadata type when a node is
149 created.</p>
150 </td>
151 </tr>
153 <tr>
154 <td>
155 <pre>
156 <b>bool</b>
157 <b>operator</b>()
158 (metadata_reference r_data) <b>const</b>
159 </pre>
160 </td>
162 <td>
163 <p>Decides whether a metadata object should be moved to
164 the front of the list. A list-update based containers
165 object will call this method to decide whether to move a
166 node to the front of the list. The method should return
167 <tt><b>true</b></tt> if the node should be moved to the
168 front of the list.</p>
170 <p><tt>metadata_reference</tt> is a reference to a
171 <a href=
172 "#metadata_type2849297114"><tt>metadata_type</tt></a>.</p>
173 </td>
174 </tr>
175 </table>
176 </div>
177 </body>
178 </html>