File indexing completed on 2025-01-18 09:29:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP
0013 #define BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP
0014
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018
0019 #include <boost/config.hpp>
0020
0021 #include <boost/mpl/list.hpp>
0022 #include <boost/mpl/push_front.hpp>
0023 #include <boost/mpl/aux_/na.hpp>
0024 #include <boost/bimap/container_adaptor/vector_adaptor.hpp>
0025 #include <boost/bimap/container_adaptor/detail/identity_converters.hpp>
0026 #include <boost/mpl/vector.hpp>
0027
0028 namespace boost {
0029 namespace bimaps {
0030 namespace container_adaptor {
0031
0032
0033
0034 template
0035 <
0036 class Base,
0037
0038 class Iterator,
0039 class ConstIterator,
0040 class ReverseIterator,
0041 class ConstReverseIterator,
0042
0043 class IteratorToBaseConverter = ::boost::mpl::na,
0044 class IteratorFromBaseConverter = ::boost::mpl::na,
0045 class ReverseIteratorFromBaseConverter = ::boost::mpl::na,
0046 class ValueToBaseConverter = ::boost::mpl::na,
0047 class ValueFromBaseConverter = ::boost::mpl::na,
0048
0049 class FunctorsFromDerivedClasses = mpl::vector<>
0050 >
0051 class vector_map_adaptor :
0052
0053 public vector_adaptor
0054 <
0055 Base,
0056 Iterator, ConstIterator, ReverseIterator, ConstReverseIterator,
0057 IteratorToBaseConverter, IteratorFromBaseConverter,
0058 ReverseIteratorFromBaseConverter,
0059 ValueToBaseConverter, ValueFromBaseConverter,
0060 FunctorsFromDerivedClasses
0061 >
0062 {
0063 typedef vector_adaptor
0064 <
0065 Base,
0066 Iterator, ConstIterator, ReverseIterator, ConstReverseIterator,
0067 IteratorToBaseConverter, IteratorFromBaseConverter,
0068 ReverseIteratorFromBaseConverter,
0069 ValueToBaseConverter, ValueFromBaseConverter,
0070 FunctorsFromDerivedClasses
0071
0072 > base_;
0073
0074
0075
0076 public:
0077
0078 typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::first_type key_type;
0079 typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
0080 typedef data_type mapped_type;
0081
0082
0083
0084 public:
0085
0086 vector_map_adaptor() {}
0087
0088 explicit vector_map_adaptor(Base & c) :
0089 base_(c) {}
0090
0091 protected:
0092
0093 typedef vector_map_adaptor vector_map_adaptor_;
0094
0095 };
0096
0097
0098 }
0099 }
0100 }
0101
0102
0103 #endif
0104