Dead
[official-gcc.git] / gomp-20050608-branch / libstdc++-v3 / docs / html / ext / pb_assoc / sample_size_policy.hpp
bloba8642700b26381d0437d41d3c468a986fbe76998
1 /**
2 * @file sample_size_policy.hpp
3 * Contains a sample size resize-policy.
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_SIZE_POLICY_HPP
19 #define SAMPLE_SIZE_POLICY_HPP
22 /**
23 * <class
24 * description = "A sample size policy."
25 * comment = "This class serves to show the interface a size policy
26 * needs to support.">
27 **/
28 class sample_size_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_size_policy
47 ();
48 /** </fn> **/
51 * <fn description = "Copy constructor."
52 * comment = "Must be copy constructible.">
53 **/
54 sample_range_hashing
55 (const sample_size_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_size_policy &r_other);
65 /** </fn> **/
68 ***************************************************************************
69 ***************************************************************************
70 * </group>
71 **/
74 /**
75 *******************************************************************************
76 *******************************************************************************
77 * </public_methods_group>
78 **/
81 /**
82 *******************************************************************************
83 *******************************************************************************
84 * <protected_methods_group>
85 **/
86 protected:
88 /**
89 **************************************************************************
90 ***************************************************************************
91 ** <group description = "Size methods">
92 **/
95 * <fn description = "Given suggested_size, a suggested size, returns
96 * an initial size of the container related to the initial size.">
97 **/
98 inline size_type
99 get_init_size
100 (size_type suggested_size) const;
101 /** </fn> **/
104 * <fn description = "Given cur_size, the
105 * current size, returns a size that is
106 * larger.">
107 **/
108 inline size_type
109 get_nearest_larger_size
110 (size_type cur_size) const;
111 /** </fn> **/
114 * <fn description = "Given cur_size, the current size, returns a size that is
115 * smaller.">
116 **/
117 inline size_type
118 get_nearest_smaller_size
119 (size_type cur_size) const;
120 /** </fn> **/
123 **************************************************************************
124 ***************************************************************************
125 ** </group>
130 *******************************************************************************
131 *******************************************************************************
132 * </protected_methods_group>
136 ** </class>
140 #endif // #ifndef SAMPLE_SIZE_POLICY_HPP