distance.hpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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.
  6. // Modifications copyright (c) 2014, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  8. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  9. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  10. // Use, modification and distribution is subject to the Boost Software License,
  11. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. #ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
  14. #define BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP
  15. #include <boost/mpl/assert.hpp>
  16. #include <boost/geometry/core/cs.hpp>
  17. #include <boost/geometry/strategies/tags.hpp>
  18. namespace boost { namespace geometry
  19. {
  20. namespace strategy { namespace distance { namespace services
  21. {
  22. template <typename Strategy> struct tag {};
  23. template <typename Strategy, typename P1, typename P2>
  24. struct return_type
  25. {
  26. BOOST_MPL_ASSERT_MSG
  27. (
  28. false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy, P1, P2>)
  29. );
  30. };
  31. template <typename Strategy> struct comparable_type
  32. {
  33. BOOST_MPL_ASSERT_MSG
  34. (
  35. false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy>)
  36. );
  37. };
  38. template <typename Strategy> struct get_comparable
  39. {
  40. BOOST_MPL_ASSERT_MSG
  41. (
  42. false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy>)
  43. );
  44. };
  45. template <typename Strategy, typename P1, typename P2>
  46. struct result_from_distance {};
  47. // Default strategy
  48. /*!
  49. \brief Traits class binding a default strategy for distance
  50. to one (or possibly two) coordinate system(s)
  51. \ingroup distance
  52. \tparam GeometryTag1 tag (point/segment/box) for which this strategy is the default
  53. \tparam GeometryTag2 tag (point/segment/box) for which this strategy is the default
  54. \tparam Point1 first point-type
  55. \tparam Point2 second point-type
  56. \tparam CsTag1 tag of coordinate system of first point type
  57. \tparam CsTag2 tag of coordinate system of second point type
  58. */
  59. template
  60. <
  61. typename GeometryTag1,
  62. typename GeometryTag2,
  63. typename Point1,
  64. typename Point2 = Point1,
  65. typename CsTag1 = typename cs_tag<Point1>::type,
  66. typename CsTag2 = typename cs_tag<Point2>::type,
  67. typename UnderlyingStrategy = void
  68. >
  69. struct default_strategy
  70. {
  71. BOOST_MPL_ASSERT_MSG
  72. (
  73. false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE_COMBINATION
  74. , (types<Point1, Point2, CsTag1, CsTag2>)
  75. );
  76. };
  77. }}} // namespace strategy::distance::services
  78. }} // namespace boost::geometry
  79. #endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_HPP