File indexing completed on 2025-01-18 09:35:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_ITERATOR_SELECTOR_HPP
0011 #define BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_ITERATOR_SELECTOR_HPP
0012
0013 #include <boost/geometry/core/tag.hpp>
0014 #include <boost/geometry/core/tags.hpp>
0015
0016 #include <boost/geometry/iterators/point_iterator.hpp>
0017 #include <boost/geometry/iterators/segment_iterator.hpp>
0018
0019
0020 namespace boost { namespace geometry
0021 {
0022
0023
0024 #ifndef DOXYGEN_NO_DETAIL
0025 namespace detail { namespace distance
0026 {
0027
0028
0029
0030 template <typename Geometry, typename Tag = typename tag<Geometry>::type>
0031 struct iterator_selector
0032 {
0033 typedef geometry::segment_iterator<Geometry> iterator_type;
0034
0035 static inline iterator_type begin(Geometry& geometry)
0036 {
0037 return segments_begin(geometry);
0038 }
0039
0040 static inline iterator_type end(Geometry& geometry)
0041 {
0042 return segments_end(geometry);
0043 }
0044 };
0045
0046 template <typename MultiPoint>
0047 struct iterator_selector<MultiPoint, multi_point_tag>
0048 {
0049 typedef geometry::point_iterator<MultiPoint> iterator_type;
0050
0051 static inline iterator_type begin(MultiPoint& multipoint)
0052 {
0053 return points_begin(multipoint);
0054 }
0055
0056 static inline iterator_type end(MultiPoint& multipoint)
0057 {
0058 return points_end(multipoint);
0059 }
0060 };
0061
0062
0063 }}
0064 #endif
0065
0066
0067 }}
0068
0069
0070 #endif