fix doc example typo
[boost.git] / boost / bimap / container_adaptor / vector_map_adaptor.hpp
blob9b0b9d3df5ce1c520fdd5bdfb28882956b17e8a5
1 // Boost.Bimap
2 //
3 // Copyright (c) 2006-2007 Matias Capeletto
4 //
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)
16 #pragma once
17 #endif
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>
28 namespace boost {
29 namespace bimaps {
30 namespace container_adaptor {
32 /// \brief Container adaptor.
34 template
36 class Base,
38 class Iterator,
39 class ConstIterator,
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 :
53 public vector_adaptor
55 Base,
56 Iterator, ConstIterator, ReverseIterator, ConstReverseIterator,
57 IteratorToBaseConverter, IteratorFromBaseConverter,
58 ReverseIteratorFromBaseConverter,
59 ValueToBaseConverter, ValueFromBaseConverter,
60 FunctorsFromDerivedClasses
63 typedef vector_adaptor
65 Base,
66 Iterator, ConstIterator, ReverseIterator, ConstReverseIterator,
67 IteratorToBaseConverter, IteratorFromBaseConverter,
68 ReverseIteratorFromBaseConverter,
69 ValueToBaseConverter, ValueFromBaseConverter,
70 FunctorsFromDerivedClasses
72 > base_;
74 // MetaData -------------------------------------------------------------
76 public:
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 -----------------------------------------------------------------
83 public:
85 vector_map_adaptor() {}
87 explicit vector_map_adaptor(Base & c) :
88 base_(c) {}
90 protected:
92 typedef vector_map_adaptor vector_map_adaptor_;
97 } // namespace container_adaptor
98 } // namespace bimaps
99 } // namespace boost
102 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP