comparison DEPENDENCIES/generic/include/boost/geometry/algorithms/clear.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
13 13
14 #ifndef BOOST_GEOMETRY_ALGORITHMS_CLEAR_HPP 14 #ifndef BOOST_GEOMETRY_ALGORITHMS_CLEAR_HPP
15 #define BOOST_GEOMETRY_ALGORITHMS_CLEAR_HPP 15 #define BOOST_GEOMETRY_ALGORITHMS_CLEAR_HPP
16 16
17 17
18 #include <boost/type_traits/remove_const.hpp>
19
20 #include <boost/variant/apply_visitor.hpp>
21 #include <boost/variant/static_visitor.hpp>
22 #include <boost/variant/variant_fwd.hpp>
23
18 #include <boost/geometry/algorithms/not_implemented.hpp> 24 #include <boost/geometry/algorithms/not_implemented.hpp>
19 #include <boost/geometry/core/access.hpp> 25 #include <boost/geometry/core/access.hpp>
20 #include <boost/geometry/core/exterior_ring.hpp> 26 #include <boost/geometry/core/exterior_ring.hpp>
21 #include <boost/geometry/core/interior_rings.hpp> 27 #include <boost/geometry/core/interior_rings.hpp>
22 #include <boost/geometry/core/mutable_range.hpp> 28 #include <boost/geometry/core/mutable_range.hpp>
23 #include <boost/geometry/core/tag_cast.hpp> 29 #include <boost/geometry/core/tag_cast.hpp>
30 #include <boost/geometry/core/tags.hpp>
24 #include <boost/geometry/geometries/concepts/check.hpp> 31 #include <boost/geometry/geometries/concepts/check.hpp>
25 #include <boost/type_traits/remove_const.hpp>
26 #include <boost/variant/apply_visitor.hpp>
27 #include <boost/variant/static_visitor.hpp>
28 #include <boost/variant/variant_fwd.hpp>
29 32
30 33
31 namespace boost { namespace geometry 34 namespace boost { namespace geometry
32 { 35 {
33 36
123 : detail::clear::polygon_clear<Polygon> 126 : detail::clear::polygon_clear<Polygon>
124 {}; 127 {};
125 128
126 129
127 template <typename Geometry> 130 template <typename Geometry>
128 struct devarianted_clear 131 struct clear<Geometry, multi_tag>
132 : detail::clear::collection_clear<Geometry>
133 {};
134
135
136 } // namespace dispatch
137 #endif // DOXYGEN_NO_DISPATCH
138
139
140 namespace resolve_variant {
141
142 template <typename Geometry>
143 struct clear
129 { 144 {
130 static inline void apply(Geometry& geometry) 145 static inline void apply(Geometry& geometry)
131 { 146 {
132 clear<Geometry>::apply(geometry); 147 dispatch::clear<Geometry>::apply(geometry);
133 } 148 }
134 }; 149 };
135 150
136 template <BOOST_VARIANT_ENUM_PARAMS(typename T)> 151 template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
137 struct devarianted_clear<variant<BOOST_VARIANT_ENUM_PARAMS(T)> > 152 struct clear<variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
138 { 153 {
139 struct visitor: static_visitor<void> 154 struct visitor: static_visitor<void>
140 { 155 {
141 template <typename Geometry> 156 template <typename Geometry>
142 inline void operator()(Geometry& geometry) const 157 inline void operator()(Geometry& geometry) const
149 { 164 {
150 apply_visitor(visitor(), geometry); 165 apply_visitor(visitor(), geometry);
151 } 166 }
152 }; 167 };
153 168
154 169 } // namespace resolve_variant
155 } // namespace dispatch
156 #endif // DOXYGEN_NO_DISPATCH
157 170
158 171
159 /*! 172 /*!
160 \brief Clears a linestring, ring or polygon (exterior+interiors) or multi* 173 \brief Clears a linestring, ring or polygon (exterior+interiors) or multi*
161 \details Generic function to clear a geometry. All points will be removed from the collection or collections 174 \details Generic function to clear a geometry. All points will be removed from the collection or collections
172 template <typename Geometry> 185 template <typename Geometry>
173 inline void clear(Geometry& geometry) 186 inline void clear(Geometry& geometry)
174 { 187 {
175 concept::check<Geometry>(); 188 concept::check<Geometry>();
176 189
177 dispatch::devarianted_clear<Geometry>::apply(geometry); 190 resolve_variant::clear<Geometry>::apply(geometry);
178 } 191 }
179 192
180 193
181 }} // namespace boost::geometry 194 }} // namespace boost::geometry
182 195