services.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 = typename geometry::cs_tag<Geometry1>::type,
  22. typename CSTag2 = typename geometry::cs_tag<Geometry2>::type
  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 = typename geometry::cs_tag<Geometry1>::type,
  44. typename CSTag2 = typename geometry::cs_tag<Geometry2>::type
  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