]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 | static const operation_type value = operation_union; | |
46 | }; | |
47 | ||
48 | template <> | |
49 | struct operation_from_overlay<overlay_intersection> | |
50 | { | |
51 | static const operation_type value = operation_intersection; | |
52 | }; | |
53 | ||
54 | template <> | |
55 | struct operation_from_overlay<overlay_difference> | |
56 | { | |
57 | static const operation_type value = operation_intersection; | |
58 | }; | |
59 | ||
60 | }} // namespace detail::overlay | |
61 | #endif //DOXYGEN_NO_DETAIL | |
62 | ||
63 | ||
64 | }} // namespace boost::geometry | |
65 | ||
66 | ||
67 | #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_OVERLAY_TYPE_HPP |