|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80944 - in trunk/boost/geometry: algorithms algorithms/detail/overlay multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-10-10 17:35:40
Author: bruno.lalande
Date: 2012-10-10 17:35:39 EDT (Wed, 10 Oct 2012)
New Revision: 80944
URL: http://svn.boost.org/trac/boost/changeset/80944
Log:
Moved Strategy template parameter from class to function level in dispatch::intersection_insert.
Text files modified:
trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp | 95 ++++++++++++++----------------------
trunk/boost/geometry/algorithms/difference.hpp | 3
trunk/boost/geometry/algorithms/intersection.hpp | 3
trunk/boost/geometry/algorithms/sym_difference.hpp | 6 -
trunk/boost/geometry/multi/algorithms/intersection.hpp | 101 +++++++++++++++------------------------
5 files changed, 79 insertions(+), 129 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp 2012-10-10 17:35:39 EDT (Wed, 10 Oct 2012)
@@ -44,11 +44,11 @@
template
<
typename Segment1, typename Segment2,
- typename OutputIterator, typename PointOut,
- typename Strategy
+ typename OutputIterator, typename PointOut
>
struct intersection_segment_segment_point
{
+ template <typename Strategy>
static inline OutputIterator apply(Segment1 const& segment1,
Segment2 const& segment2, OutputIterator out,
Strategy const& )
@@ -80,11 +80,11 @@
template
<
typename Linestring1, typename Linestring2,
- typename OutputIterator, typename PointOut,
- typename Strategy
+ typename OutputIterator, typename PointOut
>
struct intersection_linestring_linestring_point
{
+ template <typename Strategy>
static inline OutputIterator apply(Linestring1 const& linestring1,
Linestring2 const& linestring2, OutputIterator out,
Strategy const& )
@@ -115,8 +115,7 @@
typename LineString, typename Areal,
bool ReverseAreal,
typename OutputIterator, typename LineStringOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_of_linestring_with_areal
{
@@ -145,6 +144,7 @@
}
#endif
+ template <typename Strategy>
static inline OutputIterator apply(LineString const& linestring, Areal const& areal,
OutputIterator out,
Strategy const& )
@@ -230,8 +230,7 @@
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator,
typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
{
@@ -250,8 +249,7 @@
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator,
typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -260,8 +258,7 @@
Geometry1, Geometry2,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::overlay::overlay
<Geometry1, Geometry2, Reverse1, Reverse2, ReverseOut, GeometryOut, OverlayType>
{};
@@ -275,8 +272,7 @@
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator,
typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -285,8 +281,7 @@
Geometry, Box,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::overlay::overlay
<Geometry, Box, Reverse1, Reverse2, ReverseOut, GeometryOut, OverlayType>
{};
@@ -297,8 +292,7 @@
typename Segment1, typename Segment2,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -307,12 +301,11 @@
Segment1, Segment2,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType, Strategy
+ OverlayType
> : detail::intersection::intersection_segment_segment_point
<
Segment1, Segment2,
- OutputIterator, GeometryOut,
- Strategy
+ OutputIterator, GeometryOut
>
{};
@@ -322,8 +315,7 @@
typename Linestring1, typename Linestring2,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -332,12 +324,11 @@
Linestring1, Linestring2,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType, Strategy
+ OverlayType
> : detail::intersection::intersection_linestring_linestring_point
<
Linestring1, Linestring2,
- OutputIterator, GeometryOut,
- Strategy
+ OutputIterator, GeometryOut
>
{};
@@ -347,8 +338,7 @@
typename Linestring, typename Box,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -357,10 +347,10 @@
Linestring, Box,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{
+ template <typename Strategy>
static inline OutputIterator apply(Linestring const& linestring,
Box const& box, OutputIterator out, Strategy const& )
{
@@ -377,8 +367,7 @@
typename Linestring, typename Polygon,
bool ReverseLinestring, bool ReversePolygon, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -387,15 +376,13 @@
Linestring, Polygon,
ReverseLinestring, ReversePolygon, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_linestring_with_areal
<
Linestring, Polygon,
ReversePolygon,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
@@ -405,8 +392,7 @@
typename Linestring, typename Ring,
bool ReverseLinestring, bool ReverseRing, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -415,15 +401,13 @@
Linestring, Ring,
ReverseLinestring, ReverseRing, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_linestring_with_areal
<
Linestring, Ring,
ReverseRing,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
@@ -432,8 +416,7 @@
typename Segment, typename Box,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -442,10 +425,10 @@
Segment, Box,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{
+ template <typename Strategy>
static inline OutputIterator apply(Segment const& segment,
Box const& box, OutputIterator out, Strategy const& )
{
@@ -465,8 +448,7 @@
typename Geometry1, typename Geometry2,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename PointOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -475,10 +457,10 @@
Geometry1, Geometry2,
Reverse1, Reverse2, ReverseOut,
OutputIterator, PointOut,
- OverlayType,
- Strategy
+ OverlayType
>
{
+ template <typename Strategy>
static inline OutputIterator apply(Geometry1 const& geometry1,
Geometry2 const& geometry2, OutputIterator out, Strategy const& )
{
@@ -509,11 +491,11 @@
typename Geometry1, typename Geometry2,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert_reversed
{
+ template <typename Strategy>
static inline OutputIterator apply(Geometry1 const& g1,
Geometry2 const& g2, OutputIterator out,
Strategy const& strategy)
@@ -525,8 +507,7 @@
Geometry2, Geometry1,
Reverse2, Reverse1, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>::apply(g2, g1, out, strategy);
}
};
@@ -572,8 +553,7 @@
overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value,
overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>,
geometry::dispatch::intersection_insert
<
@@ -588,8 +568,7 @@
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value,
geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
>::type::apply(geometry1, geometry2, out, strategy);
}
Modified: trunk/boost/geometry/algorithms/difference.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/difference.hpp (original)
+++ trunk/boost/geometry/algorithms/difference.hpp 2012-10-10 17:35:39 EDT (Wed, 10 Oct 2012)
@@ -67,8 +67,7 @@
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value,
geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
OutputIterator, GeometryOut,
- overlay_difference,
- Strategy
+ overlay_difference
>::apply(geometry1, geometry2, out, strategy);
}
Modified: trunk/boost/geometry/algorithms/intersection.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/intersection.hpp (original)
+++ trunk/boost/geometry/algorithms/intersection.hpp 2012-10-10 17:35:39 EDT (Wed, 10 Oct 2012)
@@ -111,8 +111,7 @@
detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, false>::value,
detail::overlay::do_reverse<geometry::point_order<OneOut>::value>::value,
output_iterator, OneOut,
- overlay_intersection,
- Strategy
+ overlay_intersection
>::apply(geometry1, geometry2, std::back_inserter(geometry_out), strategy);
return true;
Modified: trunk/boost/geometry/algorithms/sym_difference.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/sym_difference.hpp (original)
+++ trunk/boost/geometry/algorithms/sym_difference.hpp 2012-10-10 17:35:39 EDT (Wed, 10 Oct 2012)
@@ -70,8 +70,7 @@
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value,
geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
OutputIterator, GeometryOut,
- overlay_difference,
- Strategy
+ overlay_difference
>::apply(geometry1, geometry2, out, strategy);
out = geometry::dispatch::intersection_insert
<
@@ -86,8 +85,7 @@
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value, true>::value,
geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
OutputIterator, GeometryOut,
- overlay_difference,
- Strategy
+ overlay_difference
>::apply(geometry2, geometry1, out, strategy);
return out;
}
Modified: trunk/boost/geometry/multi/algorithms/intersection.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/intersection.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/intersection.hpp 2012-10-10 17:35:39 EDT (Wed, 10 Oct 2012)
@@ -39,11 +39,11 @@
template
<
typename MultiLinestring1, typename MultiLinestring2,
- typename OutputIterator, typename PointOut,
- typename Strategy
+ typename OutputIterator, typename PointOut
>
struct intersection_multi_linestring_multi_linestring_point
{
+ template <typename Strategy>
static inline OutputIterator apply(MultiLinestring1 const& ml1,
MultiLinestring2 const& ml2, OutputIterator out,
Strategy const& strategy)
@@ -68,7 +68,7 @@
<
typename boost::range_value<MultiLinestring1>::type,
typename boost::range_value<MultiLinestring2>::type,
- OutputIterator, PointOut, Strategy
+ OutputIterator, PointOut
>::apply(*it1, *it2, out, strategy);
}
}
@@ -81,11 +81,11 @@
template
<
typename Linestring, typename MultiLinestring,
- typename OutputIterator, typename PointOut,
- typename Strategy
+ typename OutputIterator, typename PointOut
>
struct intersection_linestring_multi_linestring_point
{
+ template <typename Strategy>
static inline OutputIterator apply(Linestring const& linestring,
MultiLinestring const& ml, OutputIterator out,
Strategy const& strategy)
@@ -101,7 +101,7 @@
<
Linestring,
typename boost::range_value<MultiLinestring>::type,
- OutputIterator, PointOut, Strategy
+ OutputIterator, PointOut
>::apply(linestring, *it, out, strategy);
}
@@ -117,11 +117,11 @@
typename MultiLinestring, typename Areal,
bool ReverseAreal,
typename OutputIterator, typename LineStringOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_of_multi_linestring_with_areal
{
+ template <typename Strategy>
static inline OutputIterator apply(MultiLinestring const& ml, Areal const& areal,
OutputIterator out,
Strategy const& strategy)
@@ -137,7 +137,7 @@
<
typename boost::range_value<MultiLinestring>::type,
Areal, ReverseAreal,
- OutputIterator, LineStringOut, OverlayType, Strategy
+ OutputIterator, LineStringOut, OverlayType
>::apply(*it, areal, out, strategy);
}
@@ -152,11 +152,11 @@
typename Areal, typename MultiLinestring,
bool ReverseAreal,
typename OutputIterator, typename LineStringOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_of_areal_with_multi_linestring
{
+ template <typename Strategy>
static inline OutputIterator apply(Areal const& areal, MultiLinestring const& ml,
OutputIterator out,
Strategy const& strategy)
@@ -165,8 +165,7 @@
<
MultiLinestring, Areal, ReverseAreal,
OutputIterator, LineStringOut,
- OverlayType,
- Strategy
+ OverlayType
>::apply(ml, areal, out, strategy);
}
};
@@ -176,11 +175,11 @@
template
<
typename MultiLinestring, typename Box,
- typename OutputIterator, typename LinestringOut,
- typename Strategy
+ typename OutputIterator, typename LinestringOut
>
struct clip_multi_linestring
{
+ template <typename Strategy>
static inline OutputIterator apply(MultiLinestring const& multi_linestring,
Box const& box, OutputIterator out, Strategy const& )
{
@@ -213,8 +212,7 @@
typename MultiLinestring1, typename MultiLinestring2,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -223,13 +221,11 @@
MultiLinestring1, MultiLinestring2,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_multi_linestring_multi_linestring_point
<
MultiLinestring1, MultiLinestring2,
- OutputIterator, GeometryOut,
- Strategy
+ OutputIterator, GeometryOut
>
{};
@@ -239,8 +235,7 @@
typename Linestring, typename MultiLinestring,
typename OutputIterator, typename GeometryOut,
bool Reverse1, bool Reverse2, bool ReverseOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -249,13 +244,11 @@
Linestring, MultiLinestring,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_linestring_multi_linestring_point
<
Linestring, MultiLinestring,
- OutputIterator, GeometryOut,
- Strategy
+ OutputIterator, GeometryOut
>
{};
@@ -265,8 +258,7 @@
typename MultiLinestring, typename Box,
bool Reverse1, bool Reverse2, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -275,13 +267,11 @@
MultiLinestring, Box,
Reverse1, Reverse2, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::clip_multi_linestring
<
MultiLinestring, Box,
- OutputIterator, GeometryOut,
- Strategy
+ OutputIterator, GeometryOut
>
{};
@@ -291,8 +281,7 @@
typename Linestring, typename MultiPolygon,
bool ReverseLinestring, bool ReverseMultiPolygon, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -301,15 +290,13 @@
Linestring, MultiPolygon,
ReverseLinestring, ReverseMultiPolygon, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_linestring_with_areal
<
Linestring, MultiPolygon,
ReverseMultiPolygon,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
@@ -321,8 +308,7 @@
typename Polygon, typename MultiLinestring,
bool ReversePolygon, bool ReverseMultiLinestring, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -331,15 +317,13 @@
Polygon, MultiLinestring,
ReversePolygon, ReverseMultiLinestring, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_areal_with_multi_linestring
<
Polygon, MultiLinestring,
ReversePolygon,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
@@ -349,8 +333,7 @@
typename MultiLinestring, typename Ring,
bool ReverseMultiLinestring, bool ReverseRing, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -359,15 +342,13 @@
MultiLinestring, Ring,
ReverseMultiLinestring, ReverseRing, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_multi_linestring_with_areal
<
MultiLinestring, Ring,
ReverseRing,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
@@ -376,8 +357,7 @@
typename MultiLinestring, typename Polygon,
bool ReverseMultiLinestring, bool ReverseRing, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -386,15 +366,13 @@
MultiLinestring, Polygon,
ReverseMultiLinestring, ReverseRing, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_multi_linestring_with_areal
<
MultiLinestring, Polygon,
ReverseRing,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
@@ -405,8 +383,7 @@
typename MultiLinestring, typename MultiPolygon,
bool ReverseMultiLinestring, bool ReverseMultiPolygon, bool ReverseOut,
typename OutputIterator, typename GeometryOut,
- overlay_type OverlayType,
- typename Strategy
+ overlay_type OverlayType
>
struct intersection_insert
<
@@ -415,15 +392,13 @@
MultiLinestring, MultiPolygon,
ReverseMultiLinestring, ReverseMultiPolygon, ReverseOut,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
> : detail::intersection::intersection_of_multi_linestring_with_areal
<
MultiLinestring, MultiPolygon,
ReverseMultiPolygon,
OutputIterator, GeometryOut,
- OverlayType,
- Strategy
+ OverlayType
>
{};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk