Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:37

0001 // Boost.Bimap
0002 //
0003 // Copyright (c) 2006-2007 Matias Capeletto
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 /// \file container_adaptor/vector_map_adaptor.hpp
0010 /// \brief Container adaptor.
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 /// \brief Container adaptor.
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     // MetaData -------------------------------------------------------------
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     // Access -----------------------------------------------------------------
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 } // namespace container_adaptor
0099 } // namespace bimaps
0100 } // namespace boost
0101 
0102 
0103 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_VECTOR_MAP_ADAPTOR_HPP
0104