services.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Boost.Geometry
  2. // Copyright (c) 2021, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  4. // Licensed under the Boost Software License version 1.0.
  5. // http://www.boost.org/users/license.html
  6. #ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_SERVICES_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_DISTANCE_SERVICES_HPP
  8. #include <boost/geometry/core/cs.hpp>
  9. #include <boost/geometry/core/static_assert.hpp>
  10. #include <boost/geometry/strategies/detail.hpp>
  11. namespace boost { namespace geometry
  12. {
  13. namespace strategies { namespace distance
  14. {
  15. namespace services
  16. {
  17. template
  18. <
  19. typename Geometry1,
  20. typename Geometry2,
  21. typename CSTag1 = geometry::cs_tag_t<Geometry1>,
  22. typename CSTag2 = geometry::cs_tag_t<Geometry2>
  23. >
  24. struct default_strategy
  25. {
  26. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  27. "Not implemented for these Geometries' coordinate systems.",
  28. Geometry1, Geometry2, CSTag1, CSTag2);
  29. };
  30. template <typename Strategy>
  31. struct strategy_converter
  32. {
  33. static auto get(Strategy const&)
  34. {
  35. return strategies::detail::not_implemented();
  36. }
  37. };
  38. template
  39. <
  40. typename Geometry1,
  41. typename Geometry2,
  42. typename Strategy,
  43. typename CSTag1 = geometry::cs_tag_t<Geometry1>,
  44. typename CSTag2 = geometry::cs_tag_t<Geometry2>
  45. >
  46. struct custom_strategy_converter
  47. {
  48. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  49. "Not implemented for this Strategy.",
  50. Strategy);
  51. };
  52. } // namespace services
  53. }} // namespace strategies::distance
  54. }} // namespace boost::geometry
  55. #endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_SERVICES_HPP