• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
6 
7 // This file was modified by Oracle on 2017.
8 // Modifications copyright (c) 2017 Oracle and/or its affiliates.
9 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10 
11 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
12 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
13 
14 // Use, modification and distribution is subject to the Boost Software License,
15 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
17 
18 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_MODIFY_HPP
19 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_MODIFY_HPP
20 
21 
22 #include <boost/range.hpp>
23 
24 
25 namespace boost { namespace geometry
26 {
27 
28 
29 #ifndef DOXYGEN_NO_DETAIL
30 namespace detail
31 {
32 
33 
34 template <typename MultiGeometry, typename Policy>
35 struct multi_modify
36 {
applyboost::geometry::detail::multi_modify37     static inline void apply(MultiGeometry& multi)
38     {
39         typedef typename boost::range_iterator<MultiGeometry>::type iterator_type;
40         for (iterator_type it = boost::begin(multi);
41             it != boost::end(multi);
42             ++it)
43         {
44             Policy::apply(*it);
45         }
46     }
47 
48     template <typename Strategy>
applyboost::geometry::detail::multi_modify49     static inline void apply(MultiGeometry& multi, Strategy const& strategy)
50     {
51         typedef typename boost::range_iterator<MultiGeometry>::type iterator_type;
52         for (iterator_type it = boost::begin(multi);
53             it != boost::end(multi);
54             ++it)
55         {
56             Policy::apply(*it, strategy);
57         }
58     }
59 };
60 
61 
62 } // namespace detail
63 #endif
64 
65 
66 }} // namespace boost::geometry
67 
68 
69 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_MODIFY_HPP
70