00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00045 #ifndef ASSOC_CNTNR_BASE_HPP
00046 #define ASSOC_CNTNR_BASE_HPP
00047
00048 #include <ext/pb_assoc/detail/typelist.hpp>
00049
00050 #define PB_ASSOC_DATA_TRUE_INDICATOR
00051 #include <ext/pb_assoc/detail/lu_map_/lu_map_.hpp>
00052 #undef PB_ASSOC_DATA_TRUE_INDICATOR
00053
00054 #define PB_ASSOC_DATA_FALSE_INDICATOR
00055 #include <ext/pb_assoc/detail/lu_map_/lu_map_.hpp>
00056 #undef PB_ASSOC_DATA_FALSE_INDICATOR
00057
00058 #define PB_ASSOC_DATA_TRUE_INDICATOR
00059 #include <ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp>
00060 #undef PB_ASSOC_DATA_TRUE_INDICATOR
00061
00062 #define PB_ASSOC_DATA_FALSE_INDICATOR
00063 #include <ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp>
00064 #undef PB_ASSOC_DATA_FALSE_INDICATOR
00065
00066 #define PB_ASSOC_DATA_TRUE_INDICATOR
00067 #include <ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp>
00068 #undef PB_ASSOC_DATA_TRUE_INDICATOR
00069
00070 #define PB_ASSOC_DATA_FALSE_INDICATOR
00071 #include <ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp>
00072 #undef PB_ASSOC_DATA_FALSE_INDICATOR
00073
00074 #define PB_ASSOC_DATA_TRUE_INDICATOR
00075 #include <ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp>
00076 #undef PB_ASSOC_DATA_TRUE_INDICATOR
00077
00078 #define PB_ASSOC_DATA_FALSE_INDICATOR
00079 #include <ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp>
00080 #undef PB_ASSOC_DATA_FALSE_INDICATOR
00081
00082 #define PB_ASSOC_DATA_TRUE_INDICATOR
00083 #include <ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp>
00084 #undef PB_ASSOC_DATA_TRUE_INDICATOR
00085
00086 #define PB_ASSOC_DATA_FALSE_INDICATOR
00087 #include <ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp>
00088 #undef PB_ASSOC_DATA_FALSE_INDICATOR
00089
00090 #define PB_ASSOC_DATA_TRUE_INDICATOR
00091 #include <ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp>
00092 #undef PB_ASSOC_DATA_TRUE_INDICATOR
00093
00094 #define PB_ASSOC_DATA_FALSE_INDICATOR
00095 #include <ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp>
00096 #undef PB_ASSOC_DATA_FALSE_INDICATOR
00097
00098 namespace pb_assoc
00099 {
00100
00101 namespace detail
00102 {
00103
00104 template<typename Key,
00105 typename Data,
00106 class Data_Structure_Taq,
00107 class Policy_Tl,
00108 class Allocator>
00109 struct assoc_cntnr_base;
00110
00111 template<typename Key, typename Data, class Policy_Tl, class Allocator>
00112 struct assoc_cntnr_base<
00113 Key,
00114 Data,
00115 lu_ds_tag,
00116 Policy_Tl,
00117 Allocator>
00118 {
00119 typedef
00120 lu_map_data_<
00121 Key,
00122 Data,
00123 typename typelist_at_index<Policy_Tl, 0>::type,
00124 Allocator,
00125 typename typelist_at_index<Policy_Tl, 1>::type>
00126 type;
00127 };
00128
00129 template<typename Key, class Policy_Tl, class Allocator>
00130 struct assoc_cntnr_base<
00131 Key,
00132 null_data_type,
00133 lu_ds_tag,
00134 Policy_Tl,
00135 Allocator>
00136 {
00137 typedef
00138 lu_map_no_data_<
00139 Key,
00140 null_data_type,
00141 typename typelist_at_index<Policy_Tl, 0>::type,
00142 Allocator,
00143 typename typelist_at_index<Policy_Tl, 1>::type>
00144 type;
00145 };
00146
00147 template<typename Key, typename Data, class Policy_Tl, class Allocator>
00148 struct assoc_cntnr_base<
00149 Key,
00150 Data,
00151 rb_tree_ds_tag,
00152 Policy_Tl,
00153 Allocator>
00154 {
00155 typedef
00156 rb_tree_data_<
00157 Key,
00158 Data,
00159 typename typelist_at_index<Policy_Tl, 0>::type,
00160 Allocator,
00161 typename typelist_at_index<Policy_Tl, 1>::type>
00162 type;
00163 };
00164
00165 template<typename Key, class Policy_Tl, class Allocator>
00166 struct assoc_cntnr_base<
00167 Key,
00168 null_data_type,
00169 rb_tree_ds_tag,
00170 Policy_Tl,
00171 Allocator>
00172 {
00173 typedef
00174 rb_tree_no_data_<
00175 Key,
00176 null_data_type,
00177 typename typelist_at_index<Policy_Tl, 0>::type,
00178 Allocator,
00179 typename typelist_at_index<Policy_Tl, 1>::type>
00180 type;
00181 };
00182
00183 template<typename Key, typename Data, class Policy_Tl, class Allocator>
00184 struct assoc_cntnr_base<
00185 Key,
00186 Data,
00187 splay_tree_ds_tag,
00188 Policy_Tl,
00189 Allocator>
00190
00191 {
00192 typedef
00193 splay_tree_data_<
00194 Key,
00195 Data,
00196 typename typelist_at_index<Policy_Tl, 0>::type,
00197 Allocator,
00198 typename typelist_at_index<Policy_Tl, 1>::type>
00199 type;
00200 };
00201
00202 template<typename Key, class Policy_Tl, class Allocator>
00203 struct assoc_cntnr_base<
00204 Key,
00205 null_data_type,
00206 splay_tree_ds_tag,
00207 Policy_Tl,
00208 Allocator>
00209 {
00210 typedef
00211 splay_tree_no_data_<
00212 Key,
00213 null_data_type,
00214 typename typelist_at_index<Policy_Tl, 0>::type,
00215 Allocator,
00216 typename typelist_at_index<Policy_Tl, 1>::type>
00217 type;
00218 };
00219
00220 template<typename Key, typename Data, class Policy_Tl, class Allocator>
00221 struct assoc_cntnr_base<
00222 Key,
00223 Data,
00224 ov_tree_ds_tag,
00225 Policy_Tl,
00226 Allocator>
00227 {
00228 typedef
00229 ov_tree_data_<
00230 Key,
00231 Data,
00232 typename typelist_at_index<Policy_Tl, 0>::type,
00233 Allocator,
00234 typename typelist_at_index<Policy_Tl, 1>::type>
00235 type;
00236 };
00237
00238 template<typename Key, class Policy_Tl, class Allocator>
00239 struct assoc_cntnr_base<
00240 Key,
00241 null_data_type,
00242 ov_tree_ds_tag,
00243 Policy_Tl,
00244 Allocator>
00245 {
00246 typedef
00247 ov_tree_no_data_<
00248 Key,
00249 null_data_type,
00250 typename typelist_at_index<Policy_Tl, 0>::type,
00251 Allocator,
00252 typename typelist_at_index<Policy_Tl, 1>::type>
00253 type;
00254 };
00255
00256 template<typename Key, typename Data, class Policy_Tl, class Allocator>
00257 struct assoc_cntnr_base<
00258 Key,
00259 Data,
00260 cc_hash_ds_tag,
00261 Policy_Tl,
00262 Allocator>
00263 {
00264 typedef
00265 cc_ht_map_data_<
00266 Key,
00267 Data,
00268 typename typelist_at_index<Policy_Tl, 0>::type,
00269 typename typelist_at_index<Policy_Tl, 1>::type,
00270 Allocator,
00271 typelist_at_index<Policy_Tl, 3>::type::value,
00272 typename typelist_at_index<Policy_Tl, 4>::type,
00273 typename typelist_at_index<Policy_Tl, 2>::type>
00274 type;
00275 };
00276
00277 template<typename Key, class Policy_Tl, class Allocator>
00278 struct assoc_cntnr_base<
00279 Key,
00280 null_data_type,
00281 cc_hash_ds_tag,
00282 Policy_Tl,
00283 Allocator>
00284 {
00285 typedef
00286 cc_ht_map_no_data_<
00287 Key,
00288 null_data_type,
00289 typename typelist_at_index<Policy_Tl, 0>::type,
00290 typename typelist_at_index<Policy_Tl, 1>::type,
00291 Allocator,
00292 typelist_at_index<Policy_Tl, 3>::type::value,
00293 typename typelist_at_index<Policy_Tl, 4>::type,
00294 typename typelist_at_index<Policy_Tl, 2>::type>
00295 type;
00296 };
00297
00298 template<typename Key, typename Data, class Policy_Tl, class Allocator>
00299 struct assoc_cntnr_base<
00300 Key,
00301 Data,
00302 gp_hash_ds_tag,
00303 Policy_Tl,
00304 Allocator>
00305 {
00306 typedef
00307 gp_ht_map_data_<
00308 Key,
00309 Data,
00310 typename typelist_at_index<Policy_Tl, 0>::type,
00311 typename typelist_at_index<Policy_Tl, 1>::type,
00312 Allocator,
00313 typelist_at_index<Policy_Tl, 3>::type::value,
00314 typename typelist_at_index<Policy_Tl, 4>::type,
00315 typename typelist_at_index<Policy_Tl, 5>::type,
00316 typename typelist_at_index<Policy_Tl, 2>::type>
00317 type;
00318 };
00319
00320 template<typename Key, class Policy_Tl, class Allocator>
00321 struct assoc_cntnr_base<
00322 Key,
00323 null_data_type,
00324 gp_hash_ds_tag,
00325 Policy_Tl,
00326 Allocator>
00327 {
00328 typedef
00329 gp_ht_map_no_data_<
00330 Key,
00331 null_data_type,
00332 typename typelist_at_index<Policy_Tl, 0>::type,
00333 typename typelist_at_index<Policy_Tl, 1>::type,
00334 Allocator,
00335 typelist_at_index<Policy_Tl, 3>::type::value,
00336 typename typelist_at_index<Policy_Tl, 4>::type,
00337 typename typelist_at_index<Policy_Tl, 5>::type,
00338 typename typelist_at_index<Policy_Tl, 2>::type>
00339 type;
00340 };
00341
00342 }
00343
00344 }
00345
00346 #endif // #ifndef ASSOC_CNTNR_BASE_HPP