2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
7 <title>counter_update_policy Interface
14 <tt>counter_update_policy
22 <p>A list-update policy that moves elements to the front of the list based on the counter algorithm.
25 <p>This class is likely to slightly change interface when random number generators become part of the C++ standard.
30 <a href = "../../../../include/ext/pb_assoc/counter_update_policy.hpp"><tt>counter_update_policy.hpp</tt>
36 <a href = "#link1">Template parameters.
42 Public Types and Constants:
47 <a href = "#link2">Size definitions.
62 <a href = "#link3">Constructors, destructor, and related.
68 <a href = "#link4">Information methods.
78 Protected Types and Constants:
83 <a href = "#link5">Metadata definitions.
98 <a href = "#link6">Metadata operations.
111 <a name = "link1">Template parameters.
116 <table WIDTH = "100%" BORDER = "1">
117 <TR><TD Width = "20%" ALIGN = "left"><b>Parameter</b></TD><TD Width = "50%" ALIGN = "left"><b>Description</b></TD><TD Width = "30%" ALIGN = "left"><b>Default Value</b></TD></TR>
122 <pre><a name = "Size_Type3735929483">Size_Type</a></pre>
143 <pre><a name = "Metadata_Reference3735929465">Metadata_Reference</a></pre>
149 <p>Metadata reference type.</p>
155 <pre>std::allocator<
156 <a href = "counter_update_metadata.html"><tt>counter_update_metadata</tt></a>>::
167 <a name = "link2">Size definitions.
172 <table WIDTH = "100%" BORDER = "1">
173 <TR><TD Width = "30%" ALIGN = "left"><b>Type</b></TD><TD Width = "55%" ALIGN = "left"><b>Definition</b></TD><TD Width = "15%" ALIGN = "left"><b>Description</b></TD></TR>
178 <pre><a name = "size_type3735929547">size_type</a></pre>
184 <pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
190 <p>Size type used for counting the number of times each node is accessed until the count is reset to 0 and the node moved to the front of the list.</p>
200 <a name = "link3">Constructors, destructor, and related.
205 <table WIDTH = "100%" BORDER = "1">
206 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
211 <pre> counter_update_policy
212 (<a href = "#size_type3735929547">size_type</a> max_count = 5)</pre>
218 <p>Constructor. <font color = "#666666"><tt>max_count</tt></font> determines the the number of times each node is accessed until the count is reset to 0 and the node moved to the front of the list.</p>
229 (<font color = "olive">counter_update_policy</font> &r_other)</pre>
235 <p>Swaps content.</p>
245 <a name = "link4">Information methods.
250 <table WIDTH = "100%" BORDER = "1">
251 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
257 <a href = "#size_type3735929547">size_type</a>
259 () <b>const</b></pre>
265 <p>Returns the max count of each metadata (number of times it is accessed until moved to the front of the list).</p>
275 <a name = "link5">Metadata definitions.
280 <table WIDTH = "100%" BORDER = "1">
281 <TR><TD Width = "30%" ALIGN = "left"><b>Type</b></TD><TD Width = "55%" ALIGN = "left"><b>Definition</b></TD><TD Width = "15%" ALIGN = "left"><b>Description</b></TD></TR>
286 <pre><a name = "metadata_type3735929937">metadata_type</a></pre>
292 <pre><a href = "counter_update_metadata.html"><tt>counter_update_metadata</tt></a></pre>
298 <p>Metadata on which this functor operates.</p>
307 <pre><a name = "metadata_reference3735929497">metadata_reference</a></pre>
313 <pre><a href = "#Metadata_Reference3735929465">Metadata_Reference</a></pre>
319 <p>Reference to metadata on which this functor operates.</p>
329 <a name = "link6">Metadata operations.
334 <table WIDTH = "100%" BORDER = "1">
335 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
340 <pre><a href = "#metadata_type3735929937">metadata_type</a>
342 () <b>const</b></pre>
348 <p>Creates a metadata object.</p>
359 (<a href = "#metadata_reference3735929497">metadata_reference</a> r_data) <b>const</b></pre>
365 <p>Decides whether a metadata object should be moved to the front of the list.</p>