]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/include/boost/geometry/algorithms/detail/relate/relate_impl.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / algorithms / detail / relate / relate_impl.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4
5// This file was modified by Oracle on 2013, 2014, 2015.
6// Modifications copyright (c) 2013-2015 Oracle and/or its affiliates.
7
8// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
9
10// Use, modification and distribution is subject to the Boost Software License,
11// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12// http://www.boost.org/LICENSE_1_0.txt)
13
14#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP
15#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP
16
17#include <boost/mpl/if.hpp>
18#include <boost/mpl/or.hpp>
19#include <boost/type_traits/is_base_of.hpp>
20
21#include <boost/geometry/algorithms/detail/relate/interface.hpp>
22#include <boost/geometry/algorithms/not_implemented.hpp>
23#include <boost/geometry/core/tag.hpp>
24
25namespace boost { namespace geometry {
26
27
28#ifndef DOXYGEN_NO_DETAIL
29namespace detail { namespace relate {
30
31struct implemented_tag {};
32
33template <template <typename, typename> class StaticMaskTrait,
34 typename Geometry1,
35 typename Geometry2>
36struct relate_impl
37 : boost::mpl::if_
38 <
39 boost::mpl::or_
40 <
41 boost::is_base_of
42 <
43 nyi::not_implemented_tag,
44 StaticMaskTrait<Geometry1, Geometry2>
45 >,
46 boost::is_base_of
47 <
48 nyi::not_implemented_tag,
49 dispatch::relate<Geometry1, Geometry2>
50 >
51 >,
52 not_implemented
53 <
54 typename geometry::tag<Geometry1>::type,
55 typename geometry::tag<Geometry2>::type
56 >,
57 implemented_tag
58 >::type
59{
60 static inline bool apply(Geometry1 const& g1, Geometry2 const& g2)
61 {
62 typename detail::relate::result_handler_type
63 <
64 Geometry1,
65 Geometry2,
66 typename StaticMaskTrait<Geometry1, Geometry2>::type
67 >::type handler;
68
69 dispatch::relate<Geometry1, Geometry2>::apply(g1, g2, handler);
70
71 return handler.result();
72 }
73};
74
75}} // namespace detail::relate
76#endif // DOXYGEN_NO_DETAIL
77
78}} // namespace boost::geometry
79
80#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP