mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-02 21:02:13 +00:00
[append] Move the code from multi directory
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -20,6 +21,10 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_APPEND_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
@@ -28,9 +33,6 @@
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/geometries/variant.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -202,6 +204,71 @@ struct append<Geometry, RangeOrPoint, point_tag>
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace append
|
||||
{
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_to_multigeometry
|
||||
{
|
||||
static inline void apply(MultiGeometry& multigeometry,
|
||||
RangeOrPoint const& range_or_point,
|
||||
int ring_index, int multi_index)
|
||||
{
|
||||
|
||||
dispatch::append
|
||||
<
|
||||
typename boost::range_value<MultiGeometry>::type,
|
||||
RangeOrPoint
|
||||
>::apply(multigeometry[multi_index], range_or_point, ring_index);
|
||||
}
|
||||
};
|
||||
|
||||
}} // namespace detail::append
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
namespace splitted_dispatch
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Point>
|
||||
struct append_point<multi_point_tag, Geometry, Point>
|
||||
: detail::append::append_point<Geometry, Point>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename Range>
|
||||
struct append_range<multi_point_tag, Geometry, Range>
|
||||
: detail::append::append_range<Geometry, Range>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_point<multi_linestring_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_range<multi_linestring_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_point<multi_polygon_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_range<multi_polygon_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
} // namespace splitted_dispatch
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
namespace resolve_variant {
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
@@ -19,88 +20,8 @@
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_APPEND_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_APPEND_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/algorithms/append.hpp>
|
||||
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace append
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_to_multigeometry
|
||||
{
|
||||
static inline void apply(MultiGeometry& multigeometry,
|
||||
RangeOrPoint const& range_or_point,
|
||||
int ring_index, int multi_index)
|
||||
{
|
||||
|
||||
dispatch::append
|
||||
<
|
||||
typename boost::range_value<MultiGeometry>::type,
|
||||
RangeOrPoint
|
||||
>::apply(multigeometry[multi_index], range_or_point, ring_index);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::append
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
namespace splitted_dispatch
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Point>
|
||||
struct append_point<multi_point_tag, Geometry, Point>
|
||||
: detail::append::append_point<Geometry, Point>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename Range>
|
||||
struct append_range<multi_point_tag, Geometry, Range>
|
||||
: detail::append::append_range<Geometry, Range>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_point<multi_linestring_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_range<multi_linestring_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_point<multi_polygon_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
template <typename MultiGeometry, typename RangeOrPoint>
|
||||
struct append_range<multi_polygon_tag, MultiGeometry, RangeOrPoint>
|
||||
: detail::append::append_to_multigeometry<MultiGeometry, RangeOrPoint>
|
||||
{};
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_APPEND_HPP
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/core/topological_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/append.hpp>
|
||||
#include <boost/geometry/algorithms/area.hpp>
|
||||
#include <boost/geometry/algorithms/centroid.hpp>
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
@@ -49,7 +50,6 @@
|
||||
#include <boost/geometry/algorithms/unique.hpp>
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/append.hpp>
|
||||
#include <boost/geometry/multi/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
Reference in New Issue
Block a user