disjoint.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // Boost.Geometry
  2. // Copyright (c) 2017-2020, 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/geometry/core/cs.hpp>
  11. #include <boost/geometry/core/point_type.hpp>
  12. #include <boost/geometry/core/topological_dimension.hpp>
  13. #include <boost/geometry/strategies/covered_by.hpp>
  14. #include <boost/geometry/strategies/default_strategy.hpp>
  15. #include <boost/geometry/strategy/relate.hpp>
  16. namespace boost { namespace geometry { namespace strategy { namespace disjoint
  17. {
  18. #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  19. namespace services
  20. {
  21. template
  22. <
  23. typename Geometry1,
  24. typename Geometry2,
  25. typename Tag1 = typename geometry::tag<Geometry1>::type,
  26. typename Tag2 = typename geometry::tag<Geometry2>::type,
  27. int TopDim1 = geometry::topological_dimension<Geometry1>::value,
  28. int TopDim2 = geometry::topological_dimension<Geometry2>::value,
  29. typename CsTag1 = typename cs_tag<Geometry1>::type,
  30. typename CsTag2 = typename cs_tag<Geometry2>::type
  31. >
  32. struct default_strategy
  33. : relate::services::default_strategy
  34. <
  35. Geometry1, Geometry2
  36. >
  37. {};
  38. template <typename Point, typename Box>
  39. struct default_strategy<Point, Box, point_tag, box_tag, 0, 2>
  40. : strategy::covered_by::services::default_strategy<Point, Box>
  41. {};
  42. template <typename Box, typename Point>
  43. struct default_strategy<Box, Point, box_tag, point_tag, 2, 0>
  44. : strategy::covered_by::services::default_strategy<Point, Box>
  45. {};
  46. template <typename MultiPoint, typename Box>
  47. struct default_strategy<MultiPoint, Box, multi_point_tag, box_tag, 0, 2>
  48. : strategy::covered_by::services::default_strategy
  49. <
  50. typename point_type<MultiPoint>::type,
  51. Box
  52. >
  53. {};
  54. template <typename Box, typename MultiPoint>
  55. struct default_strategy<Box, MultiPoint, box_tag, multi_point_tag, 2, 0>
  56. : strategy::covered_by::services::default_strategy
  57. <
  58. typename point_type<MultiPoint>::type,
  59. Box
  60. >
  61. {};
  62. } // namespace services
  63. #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  64. }}}} // namespace boost::geometry::strategy::disjoint
  65. #endif // BOOST_GEOMETRY_STRATEGIES_DISJOINT_HPP