2 * @file sample_range_hashing.hpp
3 * Contains a range hashing policy.
5 * Copyright Ami Tavory, IBM-HRL, 2004.
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.
18 #ifndef SAMPLE_RANGE_HASHING_HPP
19 #define SAMPLE_RANGE_HASHING_HPP
24 * description = "A sample range-hashing functor."
25 * comment = "This class serves to show the interface a range-hashing
26 * functor needs to support.">
28 class sample_range_hashing
31 *******************************************************************************
32 *******************************************************************************
33 * <public_methods_group>
37 ***************************************************************************
38 ***************************************************************************
39 ** <group description = "Constructors, destructor, and related.">
43 * <fn description = "Default constructor."
44 * comment = "Must be default constructible.">
51 * <fn description = "Copy constructor."
52 * comment = "Must be copy constructible.">
55 (const sample_range_hashing
&r_other
);
59 * <fn description = "Swaps content."
60 * comment = "Must be swappable (if there is such a word).">
64 (sample_range_hashing
&r_other
);
68 ***************************************************************************
69 ***************************************************************************
74 *******************************************************************************
75 *******************************************************************************
76 * </public_methods_group>
81 *******************************************************************************
82 *******************************************************************************
83 * <protected_methods_group>
88 ***************************************************************************
89 ***************************************************************************
91 * description = "Notification methods.">
96 * description = "Notifies the policy object that the container's
97 * __size has changed to size."
98 * comment = "@@sample_range_hashing_size_type_comment">
106 ***************************************************************************
107 ***************************************************************************
113 ***************************************************************************
114 ***************************************************************************
116 * description = "Operators.">
120 * <fn description = "Transforms the __hash value hash into a
121 * ranged-hash value.">
122 * comment = "@@sample_range_hashing_size_type_comment">
126 (size_type hash
) const;
130 ***************************************************************************
131 ***************************************************************************
137 *******************************************************************************
138 *******************************************************************************
139 * </protected_methods_group>
147 #endif // #ifndef SAMPLE_RANGE_HASHING_HPP