3 // Copyright (C) 2005 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 2, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING. If not, write to the Free
18 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 // As a special exception, you may use this file as part of a free software
22 // library without restriction. Specifically, if other files instantiate
23 // templates or use macros or inline functions from this file, or you compile
24 // this file and link it with other files to produce an executable, this
25 // file does not by itself cause the resulting executable to be covered by
26 // the GNU General Public License. This exception does not however
27 // invalidate any other reasons why the executable file might be covered by
28 // the GNU General Public License.
30 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
32 // Permission to use, copy, modify, sell, and distribute this software
33 // is hereby granted without fee, provided that the above copyright
34 // notice appears in all copies, and that both that copyright notice and
35 // this permission notice appear in supporting documentation. None of
36 // the above authors, nor IBM Haifa Research Laboratories, make any
37 // representation about the suitability of this software for any
38 // purpose. It is provided "as is" without express or implied warranty.
41 * @file assoc_cntnr_base.hpp
42 * Contains an associative container dispatching base.
45 #ifndef ASSOC_CNTNR_BASE_HPP
46 #define ASSOC_CNTNR_BASE_HPP
48 #include <ext/pb_assoc/detail/typelist.hpp>
50 #define PB_ASSOC_DATA_TRUE_INDICATOR
51 #include <ext/pb_assoc/detail/lu_map_/lu_map_.hpp>
52 #undef PB_ASSOC_DATA_TRUE_INDICATOR
54 #define PB_ASSOC_DATA_FALSE_INDICATOR
55 #include <ext/pb_assoc/detail/lu_map_/lu_map_.hpp>
56 #undef PB_ASSOC_DATA_FALSE_INDICATOR
58 #define PB_ASSOC_DATA_TRUE_INDICATOR
59 #include <ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp>
60 #undef PB_ASSOC_DATA_TRUE_INDICATOR
62 #define PB_ASSOC_DATA_FALSE_INDICATOR
63 #include <ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp>
64 #undef PB_ASSOC_DATA_FALSE_INDICATOR
66 #define PB_ASSOC_DATA_TRUE_INDICATOR
67 #include <ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp>
68 #undef PB_ASSOC_DATA_TRUE_INDICATOR
70 #define PB_ASSOC_DATA_FALSE_INDICATOR
71 #include <ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp>
72 #undef PB_ASSOC_DATA_FALSE_INDICATOR
74 #define PB_ASSOC_DATA_TRUE_INDICATOR
75 #include <ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp>
76 #undef PB_ASSOC_DATA_TRUE_INDICATOR
78 #define PB_ASSOC_DATA_FALSE_INDICATOR
79 #include <ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp>
80 #undef PB_ASSOC_DATA_FALSE_INDICATOR
82 #define PB_ASSOC_DATA_TRUE_INDICATOR
83 #include <ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp>
84 #undef PB_ASSOC_DATA_TRUE_INDICATOR
86 #define PB_ASSOC_DATA_FALSE_INDICATOR
87 #include <ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp>
88 #undef PB_ASSOC_DATA_FALSE_INDICATOR
90 #define PB_ASSOC_DATA_TRUE_INDICATOR
91 #include <ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp>
92 #undef PB_ASSOC_DATA_TRUE_INDICATOR
94 #define PB_ASSOC_DATA_FALSE_INDICATOR
95 #include <ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp>
96 #undef PB_ASSOC_DATA_FALSE_INDICATOR
104 template<typename Key,
106 class Data_Structure_Taq,
109 struct assoc_cntnr_base;
111 template<typename Key, typename Data, class Policy_Tl, class Allocator>
112 struct assoc_cntnr_base<
123 typename typelist_at_index<Policy_Tl, 0>::type,
125 typename typelist_at_index<Policy_Tl, 1>::type>
129 template<typename Key, class Policy_Tl, class Allocator>
130 struct assoc_cntnr_base<
141 typename typelist_at_index<Policy_Tl, 0>::type,
143 typename typelist_at_index<Policy_Tl, 1>::type>
147 template<typename Key, typename Data, class Policy_Tl, class Allocator>
148 struct assoc_cntnr_base<
159 typename typelist_at_index<Policy_Tl, 0>::type,
161 typename typelist_at_index<Policy_Tl, 1>::type>
165 template<typename Key, class Policy_Tl, class Allocator>
166 struct assoc_cntnr_base<
177 typename typelist_at_index<Policy_Tl, 0>::type,
179 typename typelist_at_index<Policy_Tl, 1>::type>
183 template<typename Key, typename Data, class Policy_Tl, class Allocator>
184 struct assoc_cntnr_base<
196 typename typelist_at_index<Policy_Tl, 0>::type,
198 typename typelist_at_index<Policy_Tl, 1>::type>
202 template<typename Key, class Policy_Tl, class Allocator>
203 struct assoc_cntnr_base<
214 typename typelist_at_index<Policy_Tl, 0>::type,
216 typename typelist_at_index<Policy_Tl, 1>::type>
220 template<typename Key, typename Data, class Policy_Tl, class Allocator>
221 struct assoc_cntnr_base<
232 typename typelist_at_index<Policy_Tl, 0>::type,
234 typename typelist_at_index<Policy_Tl, 1>::type>
238 template<typename Key, class Policy_Tl, class Allocator>
239 struct assoc_cntnr_base<
250 typename typelist_at_index<Policy_Tl, 0>::type,
252 typename typelist_at_index<Policy_Tl, 1>::type>
256 template<typename Key, typename Data, class Policy_Tl, class Allocator>
257 struct assoc_cntnr_base<
268 typename typelist_at_index<Policy_Tl, 0>::type,
269 typename typelist_at_index<Policy_Tl, 1>::type,
271 typelist_at_index<Policy_Tl, 3>::type::value,
272 typename typelist_at_index<Policy_Tl, 4>::type,
273 typename typelist_at_index<Policy_Tl, 2>::type>
277 template<typename Key, class Policy_Tl, class Allocator>
278 struct assoc_cntnr_base<
289 typename typelist_at_index<Policy_Tl, 0>::type,
290 typename typelist_at_index<Policy_Tl, 1>::type,
292 typelist_at_index<Policy_Tl, 3>::type::value,
293 typename typelist_at_index<Policy_Tl, 4>::type,
294 typename typelist_at_index<Policy_Tl, 2>::type>
298 template<typename Key, typename Data, class Policy_Tl, class Allocator>
299 struct assoc_cntnr_base<
310 typename typelist_at_index<Policy_Tl, 0>::type,
311 typename typelist_at_index<Policy_Tl, 1>::type,
313 typelist_at_index<Policy_Tl, 3>::type::value,
314 typename typelist_at_index<Policy_Tl, 4>::type,
315 typename typelist_at_index<Policy_Tl, 5>::type,
316 typename typelist_at_index<Policy_Tl, 2>::type>
320 template<typename Key, class Policy_Tl, class Allocator>
321 struct assoc_cntnr_base<
332 typename typelist_at_index<Policy_Tl, 0>::type,
333 typename typelist_at_index<Policy_Tl, 1>::type,
335 typelist_at_index<Policy_Tl, 3>::type::value,
336 typename typelist_at_index<Policy_Tl, 4>::type,
337 typename typelist_at_index<Policy_Tl, 5>::type,
338 typename typelist_at_index<Policy_Tl, 2>::type>
342 } // namespace detail
344 } // namespace pb_assoc
346 #endif // #ifndef ASSOC_CNTNR_BASE_HPP