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_update_policy Interface</title>
10 <meta http-equiv="Content-Type" content=
11 "text/html; charset=us-ascii" />
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 "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>
26 <h2><a name="link1" id="link1">Public Methods</a></h2>
28 <h3><a name="link2" id="link2">Constructors, destructor, and
31 <table class="c1" width="100%" border="1" summary="Methods">
33 <td width="45%" align="left"><b>Method</b></td>
35 <td width="55%" align="left"><b>Description</b></td>
47 <p>Default constructor.</p>
49 <p>Must be default constructable.</p>
57 (<b>const</b> sample_update_policy &other)
62 <p>Copy constructor.</p>
64 <p>Must be copy constructable.</p>
71 <b>inline</b> <b>void</b>
73 (sample_update_policy &other)
80 <p>Must be swappable (if there is such a word).</p>
85 <h2><a name="link3" id="link3">Protected Types and
88 <h3><a name="link4" id="link4">Metadata definitions.</a></h3>
90 <table class="c1" width="100%" border="1" summary="Types">
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>
102 <a name="metadata_type2849297114" id=
103 "metadata_type2849297114">metadata_type</a>
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
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">
130 <td width="45%" align="left"><b>Method</b></td>
132 <td width="55%" align="left"><b>Description</b></td>
138 <a href="#metadata_type2849297114"><tt>metadata_type</tt></a>
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
158 (metadata_reference r_data) <b>const</b>
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
172 "#metadata_type2849297114"><tt>metadata_type</tt></a>.</p>