]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Bimap |
2 | // | |
3 | // Copyright (c) 2006-2007 Matias Capeletto | |
4 | // | |
5 | // Distributed under the Boost Software License, Version 1.0. | |
6 | // (See accompanying file LICENSE_1_0.txt or copy at | |
7 | // http://www.boost.org/LICENSE_1_0.txt) | |
8 | ||
9 | /// \file relation/member_at.hpp | |
10 | /// \brief Defines the tags for the member_at::side idiom | |
11 | ||
12 | #ifndef BOOST_BIMAP_RELATION_MEMBER_AT_HPP | |
13 | #define BOOST_BIMAP_RELATION_MEMBER_AT_HPP | |
14 | ||
15 | #if defined(_MSC_VER) | |
16 | #pragma once | |
17 | #endif | |
18 | ||
19 | #include <boost/config.hpp> | |
20 | ||
21 | namespace boost { | |
22 | namespace bimaps { | |
23 | namespace relation { | |
24 | ||
25 | /// \brief member_at::side idiom to access relation values and types using metaprogramming. | |
26 | /** | |
27 | ||
28 | This tags are used to specify which member you want to acces when using a metafunction over | |
29 | a symmetrical type. The idea is to be able to write code like: | |
30 | ||
31 | \code | |
32 | result_of::get<member_at::left,relation>::type data = get<member_at::left>(rel); | |
33 | \endcode | |
34 | ||
35 | The relation class supports this idiom even when the elements are tagged. This is useful | |
36 | because a user can decide to start tagging in any moment of the development. | |
37 | ||
38 | See also member_with_tag, is_tag_of_member_at_left, is_tag_of_member_at_right, get | |
39 | value_type_of, pair_by, pair_type_by. | |
40 | ||
41 | \ingroup relation_group | |
42 | **/ | |
43 | namespace member_at { | |
44 | ||
45 | /// \brief Member at left tag | |
46 | /** | |
47 | See also member_at, rigth. | |
48 | **/ | |
49 | ||
50 | struct left {}; | |
51 | ||
52 | /// \brief Member at right tag | |
53 | /** | |
54 | See also member_at, left. | |
55 | **/ | |
56 | ||
57 | struct right {}; | |
58 | ||
59 | /// \brief Member info tag | |
60 | /** | |
61 | See also member_at, left, right. | |
62 | **/ | |
63 | ||
64 | struct info {}; | |
65 | ||
66 | } | |
67 | ||
68 | } // namespace relation | |
69 | } // namespace bimaps | |
70 | } // namespace boost | |
71 | ||
72 | #endif // BOOST_BIMAP_RELATION_MEMBER_AT_HPP |