disjoint.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 = tag_t<Geometry1>,
  26. typename Tag2 = tag_t<Geometry2>,
  27. int TopDim1 = geometry::topological_dimension<Geometry1>::value,
  28. int TopDim2 = geometry::topological_dimension<Geometry2>::value,
  29. typename CsTag1 = cs_tag_t<Geometry1>,
  30. typename CsTag2 = cs_tag_t<Geometry2>
  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. point_type_t<MultiPoint>,
  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. point_type_t<MultiPoint>,
  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