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