1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // This file was modified by Oracle on 2013, 2014, 2015, 2019.
6 // Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
8 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
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)
14 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP
15 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP
17 #include <boost/mpl/if.hpp>
18 #include <boost/mpl/or.hpp>
19 #include <boost/type_traits/is_base_of.hpp>
21 #include <boost/geometry/algorithms/detail/relate/interface.hpp>
22 #include <boost/geometry/algorithms/not_implemented.hpp>
23 #include <boost/geometry/core/tag.hpp>
25 namespace boost { namespace geometry {
28 #ifndef DOXYGEN_NO_DETAIL
29 namespace detail { namespace relate {
31 struct implemented_tag {};
38 struct relate_impl_base
43 nyi::not_implemented_tag,
44 dispatch::relate<Geometry1, Geometry2>
48 typename geometry::tag<Geometry1>::type,
49 typename geometry::tag<Geometry2>::type
61 struct relate_impl_dispatch
62 : relate_impl_base<Geometry1, Geometry2>
64 template <typename Strategy>
65 static inline bool apply(Geometry1 const& g1, Geometry2 const& g2, Strategy const& strategy)
67 typename detail::relate::result_handler_type
74 dispatch::relate<Geometry1, Geometry2>::apply(g1, g2, handler, strategy);
76 return handler.result();
80 template <typename Geometry1, typename Geometry2>
81 struct relate_impl_dispatch<Geometry1, Geometry2, detail::relate::false_mask>
82 : relate_impl_base<Geometry1, Geometry2>
84 template <typename Strategy>
85 static inline bool apply(Geometry1 const& , Geometry2 const& , Strategy const& )
93 template <typename, typename> class StaticMaskTrait,
98 : relate_impl_dispatch
102 typename StaticMaskTrait<Geometry1, Geometry2>::type
106 }} // namespace detail::relate
107 #endif // DOXYGEN_NO_DETAIL
109 }} // namespace boost::geometry
111 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP