dummy_geometries.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_ALGORITHMS_DETAIL_DUMMY_GEOMETRIES_HPP
  7. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DUMMY_GEOMETRIES_HPP
  8. #include <boost/geometry/core/tag.hpp>
  9. #include <boost/geometry/core/tags.hpp>
  10. namespace boost { namespace geometry
  11. {
  12. #ifndef DOXYGEN_NO_DETAIL
  13. namespace detail
  14. {
  15. struct dummy_point {};
  16. struct dummy_segment {};
  17. struct dummy_box {};
  18. struct dummy_linestring {};
  19. struct dummy_ring {};
  20. struct dummy_polygon {};
  21. struct dummy_multi_point {};
  22. struct dummy_multi_linestring {};
  23. struct dummy_multi_polygon {};
  24. } // namespace detail
  25. #endif // DOXYGEN_NO_DETAIL
  26. namespace traits
  27. {
  28. template <> struct tag<geometry::detail::dummy_point> { typedef point_tag type; };
  29. template <> struct tag<geometry::detail::dummy_segment> { typedef segment_tag type; };
  30. template <> struct tag<geometry::detail::dummy_box> { typedef box_tag type; };
  31. template <> struct tag<geometry::detail::dummy_linestring> { typedef linestring_tag type; };
  32. template <> struct tag<geometry::detail::dummy_ring> { typedef ring_tag type; };
  33. template <> struct tag<geometry::detail::dummy_polygon> { typedef polygon_tag type; };
  34. template <> struct tag<geometry::detail::dummy_multi_point> { typedef multi_point_tag type; };
  35. template <> struct tag<geometry::detail::dummy_multi_linestring> { typedef multi_linestring_tag type; };
  36. template <> struct tag<geometry::detail::dummy_multi_polygon> { typedef multi_polygon_tag type; };
  37. } // namespace traits
  38. }} // namespace boost::geometry
  39. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DUMMY_GEOMETRIES_HPP