3 // Copyright (c) 2006-2007 Matias Capeletto
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 /// \file support/iterator_type_by.hpp
10 /// \brief Metafunctions to access the iterator types of a bimap
12 #ifndef BOOST_BIMAP_SUPPORT_ITERATOR_TYPE_BY_HPP
13 #define BOOST_BIMAP_SUPPORT_ITERATOR_TYPE_BY_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/bimap/relation/detail/metadata_access_builder.hpp>
22 #include <boost/bimap/relation/detail/static_access_builder.hpp>
24 #include <boost/bimap/relation/support/pair_type_by.hpp>
26 #include <boost/bimap/detail/map_view_iterator.hpp>
28 /** \struct boost::bimaps::support::iterator_type_by
30 \brief Metafunction to obtain the iterator type of the map view by one of the sides.
34 template< class Tag, class Bimap >
35 struct iterator_type_by
37 typedef -unspecified- type;
40 template< class Tag, class Bimap >
41 struct const_iterator_type_by
43 typedef -unspecified- type;
46 template< class Tag, class Bimap >
47 struct reverse_iterator_type_by
49 typedef -unspecified- type;
52 template< class Tag, class Bimap >
53 struct const_reverse_iterator_type_by
55 typedef -unspecified- type;
58 template< class Tag, class Bimap >
59 struct local_iterator_type_by
61 typedef -unspecified- type;
64 template< class Tag, class Bimap >
65 struct const_local_iterator_type_by
67 typedef -unspecified- type;
76 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
83 // Implementation of iterator type by metafunction
85 BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
92 // Implementation of const iterator type by metafunction
94 BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
96 const_iterator_type_by,
102 // Implementation of reverse iterator type by metafunction
104 BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
106 core_reverse_iterator_type_by,
109 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
110 index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
111 ::type::reverse_iterator type,
113 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
114 index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
115 ::type::reverse_iterator type
118 template< class Tag, class BimapCore >
119 struct reverse_iterator_type_by
121 typedef ::boost::bimaps::detail::map_view_iterator
124 BOOST_DEDUCED_TYPENAME BimapCore::relation,
125 BOOST_DEDUCED_TYPENAME core_reverse_iterator_type_by<Tag,BimapCore>::type
130 // Implementation of const reverse iterator type by metafunction
132 BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
134 core_const_reverse_iterator_type_by,
137 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
138 index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
139 ::type::const_reverse_iterator type,
141 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
142 index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
143 ::type::const_reverse_iterator type
146 template< class Tag, class BimapCore >
147 struct const_reverse_iterator_type_by
150 typedef ::boost::bimaps::detail::map_view_iterator
153 BOOST_DEDUCED_TYPENAME BimapCore::relation,
154 BOOST_DEDUCED_TYPENAME core_const_reverse_iterator_type_by<Tag,BimapCore>::type
160 // Implementation of local iterator type by metafunction
162 BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
164 core_local_iterator_type_by,
167 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
168 index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
169 ::type::local_iterator type,
171 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
172 index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
173 ::type::local_iterator type
177 template< class Tag, class BimapCore >
178 struct local_iterator_type_by
181 typedef ::boost::bimaps::detail::map_view_iterator
184 BOOST_DEDUCED_TYPENAME BimapCore::relation,
185 BOOST_DEDUCED_TYPENAME core_local_iterator_type_by<Tag,BimapCore>::type
191 // Implementation of const local iterator type by metafunction
193 BOOST_BIMAP_SYMMETRIC_STATIC_ACCESS_BUILDER
195 core_const_local_iterator_type_by,
198 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
199 index<BOOST_DEDUCED_TYPENAME BimapCore::left_tag>
200 ::type::const_local_iterator type,
202 typedef BOOST_DEDUCED_TYPENAME BimapCore::core_type::BOOST_NESTED_TEMPLATE
203 index<BOOST_DEDUCED_TYPENAME BimapCore::right_tag>
204 ::type::const_local_iterator type
207 template< class Tag, class BimapCore >
208 struct const_local_iterator_type_by
211 typedef ::boost::bimaps::detail::map_view_iterator
214 BOOST_DEDUCED_TYPENAME BimapCore::relation,
215 BOOST_DEDUCED_TYPENAME core_const_local_iterator_type_by<Tag,BimapCore>::type
221 } // namespace support
222 } // namespace bimaps
225 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
227 #endif // BOOST_BIMAP_SUPPORT_ITERATOR_TYPE_BY_HPP