Added MPL asserts for geometry combinations which are not implemented in intersection.

[SVN r65881]
This commit is contained in:
Barend Gehrels
2010-10-10 16:47:18 +00:00
parent 68d1af85a9
commit e87a82051b
3 changed files with 85 additions and 4 deletions

View File

@@ -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 @@ struct convert_ring<polygon_tag>
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>

View File

@@ -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 @@ template
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>
{};

View File

@@ -21,8 +21,41 @@ namespace boost { namespace geometry
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