|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65881 - in sandbox/geometry/boost/geometry: algorithms algorithms/detail/overlay multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-10-10 12:47:19
Author: barendgehrels
Date: 2010-10-10 12:47:18 EDT (Sun, 10 Oct 2010)
New Revision: 65881
URL: http://svn.boost.org/trac/boost/changeset/65881
Log:
Added MPL asserts for geometry combinations which are not implemented in intersection.
Text files modified:
sandbox/geometry/boost/geometry/algorithms/detail/overlay/assemble.hpp | 9 +++++++
sandbox/geometry/boost/geometry/algorithms/intersection.hpp | 45 ++++++++++++++++++++++++++++++++++++++-
sandbox/geometry/boost/geometry/multi/algorithms/intersection.hpp | 35 ++++++++++++++++++++++++++++++
3 files changed, 85 insertions(+), 4 deletions(-)
Modified: sandbox/geometry/boost/geometry/algorithms/detail/overlay/assemble.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/detail/overlay/assemble.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/detail/overlay/assemble.hpp 2010-10-10 12:47:18 EDT (Sun, 10 Oct 2010)
@@ -14,6 +14,7 @@
#include <vector>
#include <boost/range.hpp>
+#include <boost/mpl/assert.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
@@ -162,7 +163,13 @@
template <typename Tag, typename Geometry>
struct add_to_containment
-{};
+{
+ BOOST_MPL_ASSERT_MSG
+ (
+ false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
+ , (types<Geometry>)
+ );
+};
template <typename Ring>
struct add_to_containment<ring_tag, Ring>
Modified: sandbox/geometry/boost/geometry/algorithms/intersection.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/intersection.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/intersection.hpp 2010-10-10 12:47:18 EDT (Sun, 10 Oct 2010)
@@ -13,6 +13,7 @@
#include <cstddef>
#include <boost/mpl/if.hpp>
+#include <boost/mpl/assert.hpp>
#include <boost/range/metafunctions.hpp>
@@ -118,8 +119,48 @@
typename Strategy
>
struct intersection_inserter
- : detail::overlay::overlay
- <Geometry1, Geometry2, OutputIterator, GeometryOut, -1, Strategy>
+{
+ BOOST_MPL_ASSERT_MSG
+ (
+ false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPES
+ , (types<Geometry1, Geometry2, GeometryOut>)
+ );
+};
+
+
+template
+<
+ typename Polygon1, typename Polygon2,
+ typename OutputIterator,
+ typename PolygonOut,
+ typename Strategy
+>
+struct intersection_inserter
+ <
+ polygon_tag, polygon_tag, polygon_tag,
+ Polygon1, Polygon2,
+ OutputIterator, PolygonOut,
+ Strategy
+ > : detail::overlay::overlay
+ <Polygon1, Polygon2, OutputIterator, PolygonOut, -1, Strategy>
+{};
+
+
+template
+<
+ typename Polygon, typename Box,
+ typename OutputIterator,
+ typename PolygonOut,
+ typename Strategy
+>
+struct intersection_inserter
+ <
+ polygon_tag, box_tag, polygon_tag,
+ Polygon, Box,
+ OutputIterator, PolygonOut,
+ Strategy
+ > : detail::overlay::overlay
+ <Polygon, Box, OutputIterator, PolygonOut, -1, Strategy>
{};
Modified: sandbox/geometry/boost/geometry/multi/algorithms/intersection.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/multi/algorithms/intersection.hpp (original)
+++ sandbox/geometry/boost/geometry/multi/algorithms/intersection.hpp 2010-10-10 12:47:18 EDT (Sun, 10 Oct 2010)
@@ -21,8 +21,41 @@
namespace dispatch
{
-// Currently empty, all done in overlay / assemble
+template
+<
+ typename Polygon, typename MultiPolygon,
+ typename OutputIterator,
+ typename PolygonOut,
+ typename Strategy
+>
+struct intersection_inserter
+ <
+ polygon_tag, multi_polygon_tag, polygon_tag,
+ Polygon, MultiPolygon,
+ OutputIterator, PolygonOut,
+ Strategy
+ > : detail::overlay::overlay
+ <Polygon, MultiPolygon, OutputIterator, PolygonOut, -1, Strategy>
+{};
+
+
+template
+<
+ typename MultiPolygon1, typename MultiPolygon2,
+ typename OutputIterator,
+ typename PolygonOut,
+ typename Strategy
+>
+struct intersection_inserter
+ <
+ multi_polygon_tag, multi_polygon_tag, polygon_tag,
+ MultiPolygon1, MultiPolygon2,
+ OutputIterator, PolygonOut,
+ Strategy
+ > : detail::overlay::overlay
+ <MultiPolygon1, MultiPolygon2, OutputIterator, PolygonOut, -1, Strategy>
+{};
} // namespace dispatch
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