Chris@16
|
1 // Boost.Bimap
|
Chris@16
|
2 //
|
Chris@16
|
3 // Copyright (c) 2006-2007 Matias Capeletto
|
Chris@16
|
4 //
|
Chris@16
|
5 // Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
6 // (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
7 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
8
|
Chris@16
|
9 /// \file property_map/set_support.hpp
|
Chris@16
|
10 /// \brief Support for the property map concept.
|
Chris@16
|
11
|
Chris@16
|
12 #ifndef BOOST_BIMAP_PROPERTY_MAP_SET_SUPPORT_HPP
|
Chris@16
|
13 #define BOOST_BIMAP_PROPERTY_MAP_SET_SUPPORT_HPP
|
Chris@16
|
14
|
Chris@101
|
15 #if defined(_MSC_VER)
|
Chris@16
|
16 #pragma once
|
Chris@16
|
17 #endif
|
Chris@16
|
18
|
Chris@16
|
19 #include <boost/config.hpp>
|
Chris@16
|
20
|
Chris@16
|
21 #include <boost/property_map/property_map.hpp>
|
Chris@16
|
22 #include <boost/bimap/set_of.hpp>
|
Chris@16
|
23 #include <boost/bimap/support/data_type_by.hpp>
|
Chris@16
|
24 #include <boost/bimap/support/key_type_by.hpp>
|
Chris@16
|
25
|
Chris@16
|
26 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
|
Chris@16
|
27
|
Chris@16
|
28 namespace boost {
|
Chris@16
|
29
|
Chris@16
|
30 template< class Tag, class Bimap >
|
Chris@16
|
31 struct property_traits< ::boost::bimaps::views::map_view<Tag,Bimap> >
|
Chris@16
|
32 {
|
Chris@16
|
33 typedef BOOST_DEDUCED_TYPENAME
|
Chris@16
|
34 ::boost::bimaps::support::data_type_by<Tag,Bimap>::type value_type;
|
Chris@16
|
35 typedef BOOST_DEDUCED_TYPENAME
|
Chris@16
|
36 ::boost::bimaps::support:: key_type_by<Tag,Bimap>::type key_type;
|
Chris@16
|
37
|
Chris@16
|
38 typedef readable_property_map_tag category;
|
Chris@16
|
39 };
|
Chris@16
|
40
|
Chris@16
|
41
|
Chris@16
|
42 template< class Tag, class Bimap >
|
Chris@16
|
43 const BOOST_DEDUCED_TYPENAME ::boost::bimaps::support::data_type_by<Tag,Bimap>::type &
|
Chris@16
|
44 get(const ::boost::bimaps::views::map_view<Tag,Bimap> & m,
|
Chris@16
|
45 const BOOST_DEDUCED_TYPENAME
|
Chris@16
|
46 ::boost::bimaps::support::key_type_by<Tag,Bimap>::type & key)
|
Chris@16
|
47 {
|
Chris@16
|
48 return m.at(key);
|
Chris@16
|
49 }
|
Chris@16
|
50
|
Chris@16
|
51 } // namespace boost
|
Chris@16
|
52
|
Chris@16
|
53 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
|
Chris@16
|
54
|
Chris@16
|
55 #endif // BOOST_BIMAP_PROPERTY_MAP_SET_SUPPORT_HPP
|