Back to home page

EIC code displayed by LXR

 
 

    


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

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 relation/member_at.hpp
0010 /// \brief Defines the tags for the member_at::side idiom
0011 
0012 #ifndef BOOST_BIMAP_RELATION_MEMBER_AT_HPP
0013 #define BOOST_BIMAP_RELATION_MEMBER_AT_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 namespace boost {
0022 namespace bimaps {
0023 namespace relation {
0024 
0025 /// \brief member_at::side idiom to access relation values and types using metaprogramming. 
0026 /**
0027 
0028 This tags are used to specify which member you want to access when using a metafunction over
0029 a symmetrical type. The idea is to be able to write code like:
0030 
0031 \code
0032 result_of::get<member_at::left,relation>::type data = get<member_at::left>(rel);
0033 \endcode
0034 
0035 The relation class supports this idiom even when the elements are tagged. This is useful
0036 because a user can decide to start tagging in any moment of the development.
0037 
0038 See also member_with_tag, is_tag_of_member_at_left, is_tag_of_member_at_right, get
0039 value_type_of, pair_by, pair_type_by.
0040 
0041 \ingroup relation_group
0042                                                                                         **/
0043 namespace member_at {
0044 
0045     /// \brief Member at left tag
0046     /**
0047     See also member_at, right.
0048                                             **/
0049 
0050     struct left  {};
0051 
0052     /// \brief Member at right tag
0053     /**
0054     See also member_at, left.
0055                                             **/
0056 
0057     struct right {};
0058 
0059     /// \brief Member info tag
0060     /**
0061     See also member_at, left, right.
0062                                             **/
0063 
0064     struct info  {};
0065 
0066 }
0067 
0068 } // namespace relation
0069 } // namespace bimaps
0070 } // namespace boost
0071 
0072 #endif // BOOST_BIMAP_RELATION_MEMBER_AT_HPP