distance.hpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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-2020.
  6. // Modifications copyright (c) 2014-2020, 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. template <typename Strategy, typename P1, typename P2>
  25. struct return_type
  26. {
  27. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  28. "Not implemented for this Strategy.",
  29. Strategy, P1, P2);
  30. };
  31. template <typename Strategy> struct comparable_type
  32. {
  33. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  34. "Not implemented for this Strategy.",
  35. Strategy);
  36. };
  37. template <typename Strategy> struct get_comparable
  38. {
  39. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  40. "Not implemented for this Strategy.",
  41. Strategy);
  42. };
  43. template <typename Strategy, typename P1, typename P2>
  44. struct result_from_distance
  45. {
  46. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  47. "Not implemented for this Strategy.",
  48. Strategy, P1, P2);
  49. };
  50. // Default strategy
  51. /*!
  52. \brief Traits class binding a default strategy for distance
  53. to one (or possibly two) coordinate system(s)
  54. \ingroup distance
  55. \tparam GeometryTag1 tag (point/segment/box) for which this strategy is the default
  56. \tparam GeometryTag2 tag (point/segment/box) for which this strategy is the default
  57. \tparam Point1 first point-type
  58. \tparam Point2 second point-type
  59. \tparam CsTag1 tag of coordinate system of first point type
  60. \tparam CsTag2 tag of coordinate system of second point type
  61. */
  62. template
  63. <
  64. typename GeometryTag1,
  65. typename GeometryTag2,
  66. typename Point1,
  67. typename Point2 = Point1,
  68. typename CsTag1 = typename cs_tag<Point1>::type,
  69. typename CsTag2 = typename cs_tag<Point2>::type,
  70. typename UnderlyingStrategy = void
  71. >
  72. struct default_strategy
  73. {
  74. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  75. "Not implemented for this Point type combination.",
  76. Point1, Point2, CsTag1, CsTag2);
  77. };
  78. }}} // namespace strategy::distance::services
  79. }} // namespace boost::geometry
  80. #endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP