• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
6 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
7 
8 // This file was modified by Oracle on 2013-2018.
9 // Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
10 
11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
12 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
13 
14 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
15 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
16 
17 // Use, modification and distribution is subject to the Boost Software License,
18 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
19 // http://www.boost.org/LICENSE_1_0.txt)
20 
21 #ifndef BOOST_GEOMETRY_ALGORITHMS_DISPATCH_DISJOINT_HPP
22 #define BOOST_GEOMETRY_ALGORITHMS_DISPATCH_DISJOINT_HPP
23 
24 #include <cstddef>
25 
26 #include <boost/geometry/core/coordinate_dimension.hpp>
27 #include <boost/geometry/core/tag.hpp>
28 #include <boost/geometry/core/tag_cast.hpp>
29 #include <boost/geometry/core/tags.hpp>
30 #include <boost/geometry/core/reverse_dispatch.hpp>
31 
32 #include <boost/geometry/algorithms/not_implemented.hpp>
33 
34 
35 namespace boost { namespace geometry
36 {
37 
38 
39 #ifndef DOXYGEN_NO_DISPATCH
40 namespace dispatch
41 {
42 
43 
44 template
45 <
46     typename Geometry1, typename Geometry2,
47     std::size_t DimensionCount = dimension<Geometry1>::type::value,
48     typename Tag1 = typename tag_cast
49         <
50             typename tag<Geometry1>::type,
51             segment_tag, box_tag, linear_tag, areal_tag
52         >::type,
53     typename Tag2 = typename tag_cast
54         <
55             typename tag<Geometry2>::type,
56             segment_tag, box_tag, linear_tag, areal_tag
57         >::type,
58     bool Reverse = reverse_dispatch<Geometry1, Geometry2>::type::value
59 >
60 struct disjoint
61     : not_implemented<Geometry1, Geometry2>
62 {};
63 
64 
65 // If reversal is needed, perform it
66 template
67 <
68     typename Geometry1, typename Geometry2,
69     std::size_t DimensionCount,
70     typename Tag1, typename Tag2
71 >
72 struct disjoint<Geometry1, Geometry2, DimensionCount, Tag1, Tag2, true>
73 {
74     template <typename Strategy>
applyboost::geometry::dispatch::disjoint75     static inline bool apply(Geometry1 const& g1, Geometry2 const& g2, Strategy const& strategy)
76     {
77         return disjoint
78             <
79                 Geometry2, Geometry1,
80                 DimensionCount,
81                 Tag2, Tag1
82             >::apply(g2, g1, strategy);
83     }
84 };
85 
86 
87 } // namespace dispatch
88 #endif // DOXYGEN_NO_DISPATCH
89 
90 
91 }} // namespace boost::geometry
92 
93 
94 #endif // BOOST_GEOMETRY_ALGORITHMS_DISPATCH_DISJOINT_HPP
95