distance.hpp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
  5. // This file was modified by Oracle on 2014-2021.
  6. // Modifications copyright (c) 2014-2021, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  8. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  9. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  10. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  11. // Use, modification and distribution is subject to the Boost Software License,
  12. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. #ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
  15. #define BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
  16. #include <boost/geometry/core/cs.hpp>
  17. #include <boost/geometry/core/static_assert.hpp>
  18. #include <boost/geometry/strategies/tags.hpp>
  19. namespace boost { namespace geometry
  20. {
  21. namespace strategy { namespace distance { namespace services
  22. {
  23. template <typename Strategy> struct tag
  24. {
  25. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  26. "Not implemented for this Strategy.",
  27. Strategy);
  28. };
  29. template <typename Strategy, typename P1, typename P2>
  30. struct return_type
  31. {
  32. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  33. "Not implemented for this Strategy.",
  34. Strategy, P1, P2);
  35. };
  36. template <typename Strategy> struct comparable_type
  37. {
  38. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  39. "Not implemented for this Strategy.",
  40. Strategy);
  41. };
  42. template <typename Strategy> struct get_comparable
  43. {
  44. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  45. "Not implemented for this Strategy.",
  46. Strategy);
  47. };
  48. template <typename Strategy, typename P1, typename P2>
  49. struct result_from_distance
  50. {
  51. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  52. "Not implemented for this Strategy.",
  53. Strategy, P1, P2);
  54. };
  55. // Default strategy
  56. /*!
  57. \brief Traits class binding a default strategy for distance
  58. to one (or possibly two) coordinate system(s)
  59. \ingroup distance
  60. \tparam GeometryTag1 tag (point/segment/box) for which this strategy is the default
  61. \tparam GeometryTag2 tag (point/segment/box) for which this strategy is the default
  62. \tparam Point1 first point-type
  63. \tparam Point2 second point-type
  64. \tparam CsTag1 tag of coordinate system of first point type
  65. \tparam CsTag2 tag of coordinate system of second point type
  66. */
  67. template
  68. <
  69. typename GeometryTag1,
  70. typename GeometryTag2,
  71. typename Point1,
  72. typename Point2 = Point1,
  73. typename CsTag1 = typename cs_tag<Point1>::type,
  74. typename CsTag2 = typename cs_tag<Point2>::type,
  75. typename UnderlyingStrategy = void
  76. >
  77. struct default_strategy
  78. {
  79. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  80. "Not implemented for this Point type combination.",
  81. Point1, Point2, CsTag1, CsTag2);
  82. };
  83. }}} // namespace strategy::distance::services
  84. }} // namespace boost::geometry
  85. #endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP