Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libstdc++-v3 / docs / html / ext / pb_assoc / sample_update_policy.hpp
blob70a1bd438bafcd4d1e782dfc1fd6ea0d3141c3bf
1 /**
2 * @file sample_update_policy.hpp
3 * Contains a sample policy for list update containers.
4 *
5 * Copyright Ami Tavory, IBM-HRL, 2004.
6 *
7 * Permission to use, copy, modify, sell, and distribute this software
8 * is hereby granted without fee, provided that the above copyright notice
9 * appears in all copies, and that both that copyright notice and this
10 * permission notice appear in supporting documentation.
12 * None of the above authors, nor IBM Haifa Research Laboratories, make any
13 * representation about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied warranty.
15 **/
18 #ifndef SAMPLE_UPDATE_POLICY_HPP
19 #define SAMPLE_UPDATE_POLICY_HPP
22 /**
23 * <class
24 * description = "A sample list-update policy."
25 * comment = "This class serves to show the interface a list update functor
26 * needs to support.">
27 **/
28 class sample_update_policy
30 /**
31 *******************************************************************************
32 *******************************************************************************
33 * <public_methods_group>
34 **/
35 public:
36 /**
37 ***************************************************************************
38 ***************************************************************************
39 ** <group description = "Constructors, destructor, and related.">
40 **/
43 * <fn description = "Default constructor."
44 * comment = "Must be default constructible.">
45 **/
46 sample_update_policy
47 ();
48 /** </fn> **/
51 * <fn description = "Copy constructor."
52 * comment = "Must be copy constructible.">
53 **/
54 sample_update_policy
55 (const sample_update_policy &r_other);
56 /** </fn> **/
59 * <fn description = "Swaps content."
60 * comment = "Must be swappable (if there is such a word).">
61 **/
62 inline void
63 swap
64 (sample_update_policy &r_other);
65 /** </fn> **/
68 ***************************************************************************
69 ***************************************************************************
70 * </group>
71 **/
73 /**
74 *******************************************************************************
75 *******************************************************************************
76 * </public_methods_group>
77 **/
80 /**
81 *******************************************************************************
82 *******************************************************************************
83 * <protected_types_group>
84 **/
85 protected:
87 /**
88 ***************************************************************************
89 ***************************************************************************
90 ** <group description = "Metadata definitions.">
91 **/
93 /**
94 * <tdef description = "Metadata on which this functor operates."
95 * comment = "The class must declare the metadata type on which it
96 * operates; the list-update based containers will append to
97 * each node an object of this type.">
98 **/
99 typedef
100 some_metadata_type
101 metadata_type;
102 /** </tdef> **/
106 ***************************************************************************
107 ***************************************************************************
108 * </group>
112 *******************************************************************************
113 *******************************************************************************
114 * </protected_types_group>
119 *******************************************************************************
120 *******************************************************************************
121 * <protected_methods_group>
123 protected:
125 ***************************************************************************
126 ***************************************************************************
127 ** <group description = "Metadata operations.">
131 * <fn description = "Creates a metadata object."
132 * comment = "A list-update based container object will call this
133 * method to create a metadata type when a node is created.">
135 metadata_type
136 operator()
137 () const;
138 /** </fn> **/
141 * <fn description = "Decides whether a metadata object should be
142 * moved to the front of the list. A list-update based containers object
143 * will call this
144 * method to decide whether to move a node to the front of
145 * the list. The method shoule return true if the node should
146 * be moved to the front of the list."
147 * comment = "@@sample_update_policy_metadata_reference">
149 bool
150 operator()
151 (metadata_reference r_data) const;
152 /** </fn> **/
155 ***************************************************************************
156 ***************************************************************************
157 * </group>
161 *******************************************************************************
162 *******************************************************************************
163 * </protected_methods_group>
167 * </class>
171 #endif // #ifndef SAMPLE_UPDATE_POLICY_HPP