mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-02 08:52:10 +00:00
[iterators][point_iterator] change file/directory structure for
point iterator; use detail::point_iterator namespace for the implementation details of the point iterator;
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_INNER_RANGE_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_INNER_RANGE_TYPE_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace point_iterator
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
>
|
||||
struct inner_range_type
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
!boost::is_const<Geometry>::type::value,
|
||||
typename boost::range_value<Geometry>::type,
|
||||
typename boost::range_value<Geometry>::type const
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Polygon>
|
||||
struct inner_range_type<Polygon, polygon_tag>
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
!boost::is_const<Polygon>::type::value,
|
||||
typename geometry::ring_type<Polygon>::type,
|
||||
typename geometry::ring_type<Polygon>::type const
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::point_iterator
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_INNER_RANGE_TYPE_HPP
|
||||
@@ -0,0 +1,136 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_ITERATOR_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_ITERATOR_TYPE_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/flatten_iterator.hpp>
|
||||
#include <boost/geometry/iterators/concatenate_iterator.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp>
|
||||
#include <boost/geometry/iterators/detail/point_iterator/value_type.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/dispatch/point_iterator.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace point_iterator
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
struct iterator_type
|
||||
: not_implemented<Geometry>
|
||||
{};
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Linestring>
|
||||
struct iterator_type<Linestring, linestring_tag>
|
||||
{
|
||||
typedef typename boost::range_iterator<Linestring>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Ring>
|
||||
struct iterator_type<Ring, ring_tag>
|
||||
{
|
||||
typedef typename boost::range_iterator<Ring>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Polygon>
|
||||
class iterator_type<Polygon, polygon_tag>
|
||||
{
|
||||
private:
|
||||
typedef typename inner_range_type<Polygon>::type inner_range;
|
||||
|
||||
public:
|
||||
typedef concatenate_iterator
|
||||
<
|
||||
typename boost::range_iterator<inner_range>::type,
|
||||
flatten_iterator
|
||||
<
|
||||
typename boost::range_iterator
|
||||
<
|
||||
typename geometry::interior_type<Polygon>::type
|
||||
>::type,
|
||||
typename iterator_type<inner_range>::type,
|
||||
typename value_type<Polygon>::type,
|
||||
dispatch::points_begin<inner_range>,
|
||||
dispatch::points_end<inner_range>
|
||||
>,
|
||||
typename value_type<Polygon>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiPoint>
|
||||
struct iterator_type<MultiPoint, multi_point_tag>
|
||||
{
|
||||
typedef typename boost::range_iterator<MultiPoint>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiLinestring>
|
||||
class iterator_type<MultiLinestring, multi_linestring_tag>
|
||||
{
|
||||
private:
|
||||
typedef typename inner_range_type<MultiLinestring>::type inner_range;
|
||||
|
||||
public:
|
||||
typedef flatten_iterator
|
||||
<
|
||||
typename boost::range_iterator<MultiLinestring>::type,
|
||||
typename iterator_type<inner_range>::type,
|
||||
typename value_type<MultiLinestring>::type,
|
||||
dispatch::points_begin<inner_range>,
|
||||
dispatch::points_end<inner_range>
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
class iterator_type<MultiPolygon, multi_polygon_tag>
|
||||
{
|
||||
private:
|
||||
typedef typename inner_range_type<MultiPolygon>::type inner_range;
|
||||
|
||||
public:
|
||||
typedef flatten_iterator
|
||||
<
|
||||
typename boost::range_iterator<MultiPolygon>::type,
|
||||
typename iterator_type<inner_range>::type,
|
||||
typename value_type<MultiPolygon>::type,
|
||||
dispatch::points_begin<inner_range>,
|
||||
dispatch::points_end<inner_range>
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::point_iterator
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_ITERATOR_TYPE_HPP
|
||||
@@ -0,0 +1,47 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_VALUE_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_VALUE_TYPE_HPP
|
||||
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace point_iterator
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct value_type
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
!boost::is_const<Geometry>::type::value,
|
||||
typename geometry::point_type<Geometry>::type,
|
||||
typename geometry::point_type<Geometry>::type const
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::point_iterator
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_ITERATORS_DETAIL_POINT_ITERATOR_VALUE_TYPE_HPP
|
||||
@@ -1,37 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ITERATORS_DISPATCH_POINT_ITERATOR_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_ITERATORS_DISPATCH_POINT_ITERATOR_TYPE_HPP
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
|
||||
struct point_iterator_type
|
||||
: not_implemented<Geometry>
|
||||
{};
|
||||
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_ITERATORS_DISPATCH_POINT_ITERATOR_TYPE_HPP
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/dispatch/point_iterator.hpp>
|
||||
#include <boost/geometry/iterators/point_iterator_type.hpp>
|
||||
#include <boost/geometry/iterators/detail/point_iterator/iterator_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -38,7 +38,10 @@ namespace dispatch
|
||||
template <typename Linestring>
|
||||
struct points_begin<Linestring, linestring_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<Linestring>::type
|
||||
static inline typename detail::point_iterator::iterator_type
|
||||
<
|
||||
Linestring
|
||||
>::type
|
||||
apply(Linestring& linestring)
|
||||
{
|
||||
return boost::begin(linestring);
|
||||
@@ -49,7 +52,7 @@ struct points_begin<Linestring, linestring_tag>
|
||||
template <typename Ring>
|
||||
struct points_begin<Ring, ring_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<Ring>::type
|
||||
static inline typename detail::point_iterator::iterator_type<Ring>::type
|
||||
apply(Ring& ring)
|
||||
{
|
||||
return boost::begin(ring);
|
||||
@@ -60,7 +63,10 @@ struct points_begin<Ring, ring_tag>
|
||||
template <typename Polygon>
|
||||
struct points_begin<Polygon, polygon_tag>
|
||||
{
|
||||
typedef typename point_iterator_type<Polygon>::type return_type;
|
||||
typedef typename detail::point_iterator::iterator_type
|
||||
<
|
||||
Polygon
|
||||
>::type return_type;
|
||||
|
||||
static inline return_type apply(Polygon& polygon)
|
||||
{
|
||||
@@ -83,7 +89,10 @@ struct points_begin<Polygon, polygon_tag>
|
||||
template <typename MultiPoint>
|
||||
struct points_begin<MultiPoint, multi_point_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<MultiPoint>::type
|
||||
static inline typename detail::point_iterator::iterator_type
|
||||
<
|
||||
MultiPoint
|
||||
>::type
|
||||
apply(MultiPoint& multipoint)
|
||||
{
|
||||
return boost::begin(multipoint);
|
||||
@@ -94,13 +103,15 @@ struct points_begin<MultiPoint, multi_point_tag>
|
||||
template <typename MultiLinestring>
|
||||
struct points_begin<MultiLinestring, multi_linestring_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<MultiLinestring>::type
|
||||
apply(MultiLinestring& multilinestring)
|
||||
typedef typename detail::point_iterator::iterator_type
|
||||
<
|
||||
MultiLinestring
|
||||
>::type return_type;
|
||||
|
||||
static inline return_type apply(MultiLinestring& multilinestring)
|
||||
{
|
||||
return typename point_iterator_type
|
||||
<
|
||||
MultiLinestring
|
||||
>::type(boost::begin(multilinestring), boost::end(multilinestring));
|
||||
return return_type(boost::begin(multilinestring),
|
||||
boost::end(multilinestring));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,13 +119,15 @@ struct points_begin<MultiLinestring, multi_linestring_tag>
|
||||
template <typename MultiPolygon>
|
||||
struct points_begin<MultiPolygon, multi_polygon_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<MultiPolygon>::type
|
||||
apply(MultiPolygon& multipolygon)
|
||||
typedef typename detail::point_iterator::iterator_type
|
||||
<
|
||||
MultiPolygon
|
||||
>::type return_type;
|
||||
|
||||
static inline return_type apply(MultiPolygon& multipolygon)
|
||||
{
|
||||
return typename point_iterator_type
|
||||
<
|
||||
MultiPolygon
|
||||
>::type(boost::begin(multipolygon), boost::end(multipolygon));
|
||||
return return_type(boost::begin(multipolygon),
|
||||
boost::end(multipolygon));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -136,7 +149,10 @@ namespace dispatch
|
||||
template <typename Linestring>
|
||||
struct points_end<Linestring, linestring_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<Linestring>::type
|
||||
static inline typename detail::point_iterator::iterator_type
|
||||
<
|
||||
Linestring
|
||||
>::type
|
||||
apply(Linestring& linestring)
|
||||
{
|
||||
return boost::end(linestring);
|
||||
@@ -147,7 +163,7 @@ struct points_end<Linestring, linestring_tag>
|
||||
template <typename Ring>
|
||||
struct points_end<Ring, ring_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<Ring>::type
|
||||
static inline typename detail::point_iterator::iterator_type<Ring>::type
|
||||
apply(Ring& ring)
|
||||
{
|
||||
return boost::end(ring);
|
||||
@@ -158,7 +174,10 @@ struct points_end<Ring, ring_tag>
|
||||
template <typename Polygon>
|
||||
struct points_end<Polygon, polygon_tag>
|
||||
{
|
||||
typedef typename point_iterator_type<Polygon>::type return_type;
|
||||
typedef typename detail::point_iterator::iterator_type
|
||||
<
|
||||
Polygon
|
||||
>::type return_type;
|
||||
|
||||
static inline return_type apply(Polygon& polygon)
|
||||
{
|
||||
@@ -178,7 +197,10 @@ struct points_end<Polygon, polygon_tag>
|
||||
template <typename MultiPoint>
|
||||
struct points_end<MultiPoint, multi_point_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<MultiPoint>::type
|
||||
static inline typename detail::point_iterator::iterator_type
|
||||
<
|
||||
MultiPoint
|
||||
>::type
|
||||
apply(MultiPoint& multipoint)
|
||||
{
|
||||
return boost::end(multipoint);
|
||||
@@ -189,13 +211,14 @@ struct points_end<MultiPoint, multi_point_tag>
|
||||
template <typename MultiLinestring>
|
||||
struct points_end<MultiLinestring, multi_linestring_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<MultiLinestring>::type
|
||||
apply(MultiLinestring& multilinestring)
|
||||
typedef typename detail::point_iterator::iterator_type
|
||||
<
|
||||
MultiLinestring
|
||||
>::type return_type;
|
||||
|
||||
static inline return_type apply(MultiLinestring& multilinestring)
|
||||
{
|
||||
return typename point_iterator_type
|
||||
<
|
||||
MultiLinestring
|
||||
>::type(boost::end(multilinestring));
|
||||
return return_type(boost::end(multilinestring));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -203,13 +226,14 @@ struct points_end<MultiLinestring, multi_linestring_tag>
|
||||
template <typename MultiPolygon>
|
||||
struct points_end<MultiPolygon, multi_polygon_tag>
|
||||
{
|
||||
static inline typename point_iterator_type<MultiPolygon>::type
|
||||
apply(MultiPolygon& multipolygon)
|
||||
typedef typename detail::point_iterator::iterator_type
|
||||
<
|
||||
MultiPolygon
|
||||
>::type return_type;
|
||||
|
||||
static inline return_type apply(MultiPolygon& multipolygon)
|
||||
{
|
||||
return typename point_iterator_type
|
||||
<
|
||||
MultiPolygon
|
||||
>::type(boost::end(multipolygon));
|
||||
return return_type(boost::end(multipolygon));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -221,17 +245,17 @@ struct points_end<MultiPolygon, multi_polygon_tag>
|
||||
// MK:: need to add doc here
|
||||
template <typename Geometry>
|
||||
class point_iterator
|
||||
: public dispatch::point_iterator_type<Geometry>::type
|
||||
: public detail::point_iterator::iterator_type<Geometry>::type
|
||||
{
|
||||
private:
|
||||
typedef typename dispatch::point_iterator_type<Geometry>::type base;
|
||||
typedef typename detail::point_iterator::iterator_type<Geometry>::type base;
|
||||
|
||||
base* base_ptr()
|
||||
inline base* base_ptr()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
base const* base_ptr() const
|
||||
inline base const* base_ptr() const
|
||||
{
|
||||
return this;
|
||||
}
|
||||
@@ -240,19 +264,25 @@ private:
|
||||
template <typename G> friend inline point_iterator<G> points_begin(G&);
|
||||
template <typename G> friend inline point_iterator<G> points_end(G&);
|
||||
|
||||
point_iterator(base const& base_it) : base(base_it) {}
|
||||
inline point_iterator(base const& base_it) : base(base_it) {}
|
||||
|
||||
public:
|
||||
point_iterator() {}
|
||||
inline point_iterator() {}
|
||||
|
||||
template <typename OtherGeometry>
|
||||
point_iterator(point_iterator<OtherGeometry> const& other)
|
||||
inline point_iterator(point_iterator<OtherGeometry> const& other)
|
||||
: base(*other.base_ptr())
|
||||
{
|
||||
static const bool is_conv
|
||||
= boost::is_convertible<
|
||||
typename dispatch::point_iterator_type<OtherGeometry>::type,
|
||||
typename dispatch::point_iterator_type<Geometry>::type
|
||||
typename detail::point_iterator::iterator_type
|
||||
<
|
||||
OtherGeometry
|
||||
>::type,
|
||||
typename detail::point_iterator::iterator_type
|
||||
<
|
||||
Geometry
|
||||
>::type
|
||||
>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG((is_conv),
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_TYPE_HPP
|
||||
|
||||
#include <boost/geometry/iterators/dispatch/point_iterator_type.hpp>
|
||||
#include <boost/geometry/iterators/dispatch/point_iterator.hpp>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <boost/geometry/core/interior_type.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/flatten_iterator.hpp>
|
||||
#include <boost/geometry/iterators/concatenate_iterator.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail_dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct point_iterator_value_type
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
!boost::is_const<Geometry>::type::value,
|
||||
typename geometry::point_type<Geometry>::type,
|
||||
typename geometry::point_type<Geometry>::type const
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type
|
||||
>
|
||||
struct point_iterator_inner_range_type
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
!boost::is_const<Geometry>::type::value,
|
||||
typename boost::range_value<Geometry>::type,
|
||||
typename boost::range_value<Geometry>::type const
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Polygon>
|
||||
struct point_iterator_inner_range_type<Polygon, polygon_tag>
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
!boost::is_const<Polygon>::type::value,
|
||||
typename geometry::ring_type<Polygon>::type,
|
||||
typename geometry::ring_type<Polygon>::type const
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace detail_dispatch
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename Linestring>
|
||||
struct point_iterator_type<Linestring, linestring_tag>
|
||||
{
|
||||
typedef typename boost::range_iterator<Linestring>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Ring>
|
||||
struct point_iterator_type<Ring, ring_tag>
|
||||
{
|
||||
typedef typename boost::range_iterator<Ring>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Polygon>
|
||||
class point_iterator_type<Polygon, polygon_tag>
|
||||
{
|
||||
private:
|
||||
typedef typename detail_dispatch::point_iterator_inner_range_type
|
||||
<
|
||||
Polygon
|
||||
>::type inner_range;
|
||||
|
||||
public:
|
||||
typedef concatenate_iterator
|
||||
<
|
||||
typename boost::range_iterator<inner_range>::type,
|
||||
flatten_iterator
|
||||
<
|
||||
typename boost::range_iterator
|
||||
<
|
||||
typename geometry::interior_type<Polygon>::type
|
||||
>::type,
|
||||
typename dispatch::point_iterator_type
|
||||
<
|
||||
inner_range
|
||||
>::type,
|
||||
typename detail_dispatch::point_iterator_value_type
|
||||
<
|
||||
Polygon
|
||||
>::type,
|
||||
dispatch::points_begin<inner_range>,
|
||||
dispatch::points_end<inner_range>
|
||||
>,
|
||||
typename detail_dispatch::point_iterator_value_type<Polygon>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiPoint>
|
||||
struct point_iterator_type<MultiPoint, multi_point_tag>
|
||||
{
|
||||
typedef typename boost::range_iterator<MultiPoint>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiLinestring>
|
||||
class point_iterator_type<MultiLinestring, multi_linestring_tag>
|
||||
{
|
||||
private:
|
||||
typedef typename detail_dispatch::point_iterator_inner_range_type
|
||||
<
|
||||
MultiLinestring
|
||||
>::type inner_range;
|
||||
|
||||
public:
|
||||
typedef flatten_iterator
|
||||
<
|
||||
typename boost::range_iterator<MultiLinestring>::type,
|
||||
typename dispatch::point_iterator_type<inner_range>::type,
|
||||
typename detail_dispatch::point_iterator_value_type
|
||||
<
|
||||
MultiLinestring
|
||||
>::type,
|
||||
dispatch::points_begin<inner_range>,
|
||||
dispatch::points_end<inner_range>
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
class point_iterator_type<MultiPolygon, multi_polygon_tag>
|
||||
{
|
||||
private:
|
||||
typedef typename detail_dispatch::point_iterator_inner_range_type
|
||||
<
|
||||
MultiPolygon
|
||||
>::type inner_range;
|
||||
|
||||
public:
|
||||
typedef flatten_iterator
|
||||
<
|
||||
typename boost::range_iterator<MultiPolygon>::type,
|
||||
typename dispatch::point_iterator_type<inner_range>::type,
|
||||
typename detail_dispatch::point_iterator_value_type
|
||||
<
|
||||
MultiPolygon
|
||||
>::type,
|
||||
dispatch::points_begin<inner_range>,
|
||||
dispatch::points_end<inner_range>
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_TYPE_HPP
|
||||
Reference in New Issue
Block a user