disjoint.hpp 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // Boost.Geometry
  2. // Copyright (c) 2017-2018, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  4. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  5. // Use, modification and distribution is subject to the Boost Software License,
  6. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. #ifndef BOOST_GEOMETRY_STRATEGIES_DISJOINT_HPP
  9. #define BOOST_GEOMETRY_STRATEGIES_DISJOINT_HPP
  10. #include <boost/mpl/assert.hpp>
  11. #include <boost/type_traits/is_same.hpp>
  12. #include <boost/geometry/core/cs.hpp>
  13. #include <boost/geometry/core/point_type.hpp>
  14. #include <boost/geometry/core/topological_dimension.hpp>
  15. #include <boost/geometry/strategies/covered_by.hpp>
  16. #include <boost/geometry/strategies/default_strategy.hpp>
  17. #include <boost/geometry/strategies/relate.hpp>
  18. namespace boost { namespace geometry { namespace strategy { namespace disjoint
  19. {
  20. #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  21. namespace services
  22. {
  23. template
  24. <
  25. typename Geometry1,
  26. typename Geometry2,
  27. typename Tag1 = typename geometry::tag<Geometry1>::type,
  28. typename Tag2 = typename geometry::tag<Geometry2>::type,
  29. int TopDim1 = geometry::topological_dimension<Geometry1>::value,
  30. int TopDim2 = geometry::topological_dimension<Geometry2>::value,
  31. typename CsTag1 = typename cs_tag<Geometry1>::type,
  32. typename CsTag2 = typename cs_tag<Geometry2>::type
  33. >
  34. struct default_strategy
  35. : relate::services::default_strategy
  36. <
  37. Geometry1, Geometry2
  38. >
  39. {};
  40. template <typename Point, typename Box>
  41. struct default_strategy<Point, Box, point_tag, box_tag, 0, 2>
  42. : strategy::covered_by::services::default_strategy<Point, Box>
  43. {};
  44. template <typename Box, typename Point>
  45. struct default_strategy<Box, Point, box_tag, point_tag, 2, 0>
  46. : strategy::covered_by::services::default_strategy<Point, Box>
  47. {};
  48. template <typename MultiPoint, typename Box>
  49. struct default_strategy<MultiPoint, Box, multi_point_tag, box_tag, 0, 2>
  50. : strategy::covered_by::services::default_strategy
  51. <
  52. typename point_type<MultiPoint>::type,
  53. Box
  54. >
  55. {};
  56. template <typename Box, typename MultiPoint>
  57. struct default_strategy<Box, MultiPoint, box_tag, multi_point_tag, 2, 0>
  58. : strategy::covered_by::services::default_strategy
  59. <
  60. typename point_type<MultiPoint>::type,
  61. Box
  62. >
  63. {};
  64. } // namespace services
  65. #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  66. }}}} // namespace boost::geometry::strategy::disjoint
  67. #endif // BOOST_GEOMETRY_STRATEGIES_DISJOINT_HPP