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 relation/pair_layout.hpp
|
Chris@16
|
10 /// \brief Tags for pair layouts
|
Chris@16
|
11
|
Chris@16
|
12 #ifndef BOOST_BIMAP_RELATION_PAIR_LAYOUT_HPP
|
Chris@16
|
13 #define BOOST_BIMAP_RELATION_PAIR_LAYOUT_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 namespace boost {
|
Chris@16
|
22 namespace bimaps {
|
Chris@16
|
23 namespace relation {
|
Chris@16
|
24
|
Chris@16
|
25 //@{
|
Chris@16
|
26
|
Chris@16
|
27 /// \brief Tag for normal layout. ( A,B -> A,B )
|
Chris@16
|
28
|
Chris@16
|
29 struct normal_layout {};
|
Chris@16
|
30
|
Chris@16
|
31 /// \brief Tag for mirror layout. ( A,B -> B,A )
|
Chris@16
|
32
|
Chris@16
|
33 struct mirror_layout {};
|
Chris@16
|
34
|
Chris@16
|
35 //@}
|
Chris@16
|
36
|
Chris@16
|
37 /** \struct boost::bimaps::relation::inverse_layout
|
Chris@16
|
38 \brief Metafunction to obtain the inverse of a layout.
|
Chris@16
|
39
|
Chris@16
|
40 \code
|
Chris@16
|
41 template< class Layout >
|
Chris@16
|
42 struct inverse_layout
|
Chris@16
|
43 {
|
Chris@16
|
44 typedef {InverseLayout} type;
|
Chris@16
|
45 };
|
Chris@16
|
46 \endcode
|
Chris@16
|
47
|
Chris@16
|
48 See also normal_layout, mirror_layout.
|
Chris@16
|
49 **/
|
Chris@16
|
50
|
Chris@16
|
51 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
|
Chris@16
|
52
|
Chris@16
|
53 template< class Layout >
|
Chris@16
|
54 struct inverse_layout
|
Chris@16
|
55 {
|
Chris@16
|
56 typedef normal_layout type;
|
Chris@16
|
57 };
|
Chris@16
|
58
|
Chris@16
|
59 template<>
|
Chris@16
|
60 struct inverse_layout< normal_layout >
|
Chris@16
|
61 {
|
Chris@16
|
62 typedef mirror_layout type;
|
Chris@16
|
63 };
|
Chris@16
|
64
|
Chris@16
|
65 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
|
Chris@16
|
66
|
Chris@16
|
67 } // namespace relation
|
Chris@16
|
68 } // namespace bimaps
|
Chris@16
|
69 } // namespace boost
|
Chris@16
|
70
|
Chris@16
|
71 #endif // BOOST_BIMAP_RELATION_DETAIL_PAIR_LAYOUT_HPP
|
Chris@16
|
72
|