3 // Copyright (c) 2006-2007 Matias Capeletto
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)
9 /// \file relation/support/get_pair_functor.hpp
10 /// \brief get_pair_functor definition
12 #ifndef BOOST_BIMAP_RELATION_SUPPORT_GET_PAIR_FUNCTOR_HPP
13 #define BOOST_BIMAP_RELATION_SUPPORT_GET_PAIR_FUNCTOR_HPP
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
19 #include <boost/config.hpp>
21 #include <boost/bimap/relation/support/pair_by.hpp>
28 /// \brief A Functor that takes a relation as a parameter an return the desired view.
31 This functor is included to help users of the relation class when using
34 See also member_at, pair_by().
35 \ingroup relation_group
39 template< class Tag, class Relation >
40 struct get_pair_functor
42 BOOST_DEDUCED_TYPENAME result_of::pair_by<Tag,Relation>::type
43 operator()( Relation & r ) const
45 return pair_by<Tag>(r);
48 BOOST_DEDUCED_TYPENAME result_of::pair_by<Tag,const Relation>::type
49 operator()( const Relation & r ) const
51 return pair_by<Tag>(r);
56 /// \brief A Functor that takes a relation as a parameter an return the above view.
59 \ingroup relation_group
62 template< class Relation >
63 struct get_above_view_functor
65 BOOST_DEDUCED_TYPENAME Relation::above_view &
66 operator()( Relation & r ) const
71 const BOOST_DEDUCED_TYPENAME Relation::above_view &
72 operator()( const Relation & r ) const
78 } // namespace support
79 } // namespace relation
84 #endif // BOOST_BIMAP_RELATION_SUPPORT_GET_PAIR_FUNCTOR_HPP