overlay_type.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Use, modification and distribution is subject to the Boost Software License,
  4. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_OVERLAY_TYPE_HPP
  7. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_OVERLAY_TYPE_HPP
  8. namespace boost { namespace geometry
  9. {
  10. // TODO: move to detail
  11. enum overlay_type
  12. {
  13. overlay_union,
  14. overlay_intersection,
  15. overlay_difference,
  16. overlay_buffer,
  17. overlay_dissolve
  18. };
  19. #ifndef DOXYGEN_NO_DETAIL
  20. namespace detail { namespace overlay
  21. {
  22. enum operation_type
  23. {
  24. operation_none,
  25. operation_union,
  26. operation_intersection,
  27. operation_blocked,
  28. operation_continue,
  29. operation_opposite
  30. };
  31. template <overlay_type OverlayType>
  32. struct operation_from_overlay
  33. {
  34. };
  35. template <>
  36. struct operation_from_overlay<overlay_union>
  37. {
  38. static const operation_type value = operation_union;
  39. };
  40. template <>
  41. struct operation_from_overlay<overlay_buffer>
  42. {
  43. static const operation_type value = operation_union;
  44. };
  45. template <>
  46. struct operation_from_overlay<overlay_intersection>
  47. {
  48. static const operation_type value = operation_intersection;
  49. };
  50. template <>
  51. struct operation_from_overlay<overlay_difference>
  52. {
  53. static const operation_type value = operation_intersection;
  54. };
  55. template <>
  56. struct operation_from_overlay<overlay_dissolve>
  57. {
  58. static const operation_type value = operation_union;
  59. };
  60. }} // namespace detail::overlay
  61. #endif //DOXYGEN_NO_DETAIL
  62. }} // namespace boost::geometry
  63. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_OVERLAY_TYPE_HPP