1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
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)
9 #ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENT_POINT_HPP
10 #define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENT_POINT_HPP
13 #include <boost/range.hpp>
15 #include <boost/geometry/multi/core/tags.hpp>
16 #include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
19 namespace boost { namespace geometry
23 #ifndef DOXYGEN_NO_DETAIL
24 namespace detail { namespace copy_segments
30 typename MultiGeometry,
31 typename SegmentIdentifier,
35 struct copy_segment_point_multi
37 static inline bool apply(MultiGeometry const& multi,
38 SegmentIdentifier const& seg_id, bool second,
44 seg_id.multi_index >= 0
45 && seg_id.multi_index < int(boost::size(multi))
48 // Call the single-version
49 return Policy::apply(multi[seg_id.multi_index], seg_id, second, point);
54 }} // namespace detail::copy_segments
55 #endif // DOXYGEN_NO_DETAIL
58 #ifndef DOXYGEN_NO_DISPATCH
65 typename MultiGeometry,
67 typename SegmentIdentifier,
70 struct copy_segment_point
78 : detail::copy_segments::copy_segment_point_multi
83 detail::copy_segments::copy_segment_point_polygon
85 typename boost::range_value<MultiGeometry>::type,
94 } // namespace dispatch
95 #endif // DOXYGEN_NO_DISPATCH
98 }} // namespace boost::geometry
101 #endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENT_POINT_HPP