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 container_adaptor/vector_map_adaptor.hpp
10 /// \brief Container adaptor.
12 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP
13 #define BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/mpl/list.hpp>
22 #include <boost/mpl/push_front.hpp>
23 #include <boost/mpl/aux_/na.hpp>
24 #include <boost/bimap/container_adaptor/vector_adaptor.hpp>
25 #include <boost/bimap/container_adaptor/detail/identity_converters.hpp>
26 #include <boost/mpl/vector.hpp>
30 namespace container_adaptor
{
32 /// \brief Container adaptor.
40 class ReverseIterator
,
41 class ConstReverseIterator
,
43 class IteratorToBaseConverter
= ::boost::mpl::na
,
44 class IteratorFromBaseConverter
= ::boost::mpl::na
,
45 class ReverseIteratorFromBaseConverter
= ::boost::mpl::na
,
46 class ValueToBaseConverter
= ::boost::mpl::na
,
47 class ValueFromBaseConverter
= ::boost::mpl::na
,
49 class FunctorsFromDerivedClasses
= mpl::vector
<>
51 class vector_map_adaptor
:
56 Iterator
, ConstIterator
, ReverseIterator
, ConstReverseIterator
,
57 IteratorToBaseConverter
, IteratorFromBaseConverter
,
58 ReverseIteratorFromBaseConverter
,
59 ValueToBaseConverter
, ValueFromBaseConverter
,
60 FunctorsFromDerivedClasses
63 typedef vector_adaptor
66 Iterator
, ConstIterator
, ReverseIterator
, ConstReverseIterator
,
67 IteratorToBaseConverter
, IteratorFromBaseConverter
,
68 ReverseIteratorFromBaseConverter
,
69 ValueToBaseConverter
, ValueFromBaseConverter
,
70 FunctorsFromDerivedClasses
74 // MetaData -------------------------------------------------------------
78 typedef BOOST_DEDUCED_TYPENAME
Iterator::value_type::first_type key_type
;
79 typedef BOOST_DEDUCED_TYPENAME
Iterator::value_type::second_type data_type
;
81 // Access -----------------------------------------------------------------
85 vector_map_adaptor() {}
87 explicit vector_map_adaptor(Base
& c
) :
92 typedef vector_map_adaptor vector_map_adaptor_
;
97 } // namespace container_adaptor
102 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP