Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:03:58

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/unordered_multimap_adaptor.hpp
0010 /// \brief Container adaptor to easily build a std::unordered_multimap signature compatible container.
0011 
0012 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_UNORDERED_MULTIMAP_ADAPTOR_HPP
0013 #define BOOST_BIMAP_CONTAINER_ADAPTOR_UNORDERED_MULTIMAP_ADAPTOR_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 #include <boost/bimap/container_adaptor/unordered_associative_container_adaptor.hpp>
0022 #include <boost/bimap/container_adaptor/detail/non_unique_container_helper.hpp>
0023 #include <boost/mpl/aux_/na.hpp>
0024 #include <boost/mpl/vector.hpp>
0025 
0026 namespace boost {
0027 namespace bimaps {
0028 namespace container_adaptor {
0029 
0030 /// \brief Container adaptor to easily build a std::unordered_multimap signature compatible container.
0031 
0032 template
0033 <
0034     class Base,
0035 
0036     class Iterator,
0037     class ConstIterator,
0038     class LocalIterator,
0039     class ConstLocalIterator,
0040 
0041     class IteratorToBaseConverter        = ::boost::mpl::na,
0042     class IteratorFromBaseConverter      = ::boost::mpl::na,
0043     class LocalIteratorFromBaseConverter = ::boost::mpl::na,
0044     class ValueToBaseConverter           = ::boost::mpl::na,
0045     class ValueFromBaseConverter         = ::boost::mpl::na,
0046     class KeyToBaseConverter             = ::boost::mpl::na,
0047 
0048     class FunctorsFromDerivedClasses = mpl::vector<>
0049 >
0050 class unordered_multimap_adaptor :
0051 
0052     public ::boost::bimaps::container_adaptor::
0053                 unordered_associative_container_adaptor
0054     <
0055         Base,
0056         Iterator, ConstIterator, LocalIterator, ConstLocalIterator,
0057         BOOST_DEDUCED_TYPENAME Iterator::value_type::first_type,
0058         IteratorToBaseConverter, IteratorFromBaseConverter,
0059         LocalIteratorFromBaseConverter,
0060         ValueToBaseConverter, ValueFromBaseConverter,
0061         KeyToBaseConverter,
0062         FunctorsFromDerivedClasses
0063     >
0064 {
0065     typedef ::boost::bimaps::container_adaptor::
0066                 unordered_associative_container_adaptor
0067     <
0068         Base,
0069         Iterator, ConstIterator, LocalIterator, ConstLocalIterator,
0070         BOOST_DEDUCED_TYPENAME Iterator::value_type::first_type,
0071         IteratorToBaseConverter, IteratorFromBaseConverter,
0072         LocalIteratorFromBaseConverter,
0073         ValueToBaseConverter, ValueFromBaseConverter,
0074         KeyToBaseConverter,
0075         FunctorsFromDerivedClasses
0076 
0077     > base_;
0078 
0079     // MetaData -------------------------------------------------------------
0080 
0081     public:
0082 
0083     typedef BOOST_DEDUCED_TYPENAME Iterator::value_type::second_type data_type;
0084     typedef data_type mapped_type;
0085 
0086     // Access -----------------------------------------------------------------
0087 
0088     public:
0089 
0090     explicit unordered_multimap_adaptor(Base & c) :
0091         base_(c) {}
0092 
0093     protected:
0094 
0095     typedef unordered_multimap_adaptor unordered_multimap_adaptor_;
0096 
0097     public:
0098 
0099     BOOST_BIMAP_NON_UNIQUE_CONTAINER_ADAPTOR_INSERT_FUNCTIONS
0100 };
0101 
0102 
0103 
0104 } // namespace container_adaptor
0105 } // namespace bimaps
0106 } // namespace boost
0107 
0108 
0109 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_UNORDERED_MULTIMAP_ADAPTOR_HPP
0110 
0111