File indexing completed on 2025-01-18 09:35:26
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_POLYGON_POLYGON_HPP
0010 #define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_POLYGON_POLYGON_HPP
0011
0012
0013
0014
0015 #include <boost/polygon/polygon.hpp>
0016
0017 #include <boost/geometry/core/tags.hpp>
0018 #include <boost/geometry/core/ring_type.hpp>
0019 #include <boost/geometry/core/exterior_ring.hpp>
0020 #include <boost/geometry/core/interior_rings.hpp>
0021
0022 #include <boost/geometry/geometries/adapted/boost_polygon/ring_proxy.hpp>
0023 #include <boost/geometry/geometries/adapted/boost_polygon/hole_iterator.hpp>
0024 #include <boost/geometry/geometries/adapted/boost_polygon/holes_proxy.hpp>
0025
0026
0027 namespace boost { namespace geometry
0028 {
0029
0030
0031 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
0032 namespace traits
0033 {
0034
0035 template <typename CoordinateType>
0036 struct tag<boost::polygon::polygon_with_holes_data<CoordinateType> >
0037 {
0038 typedef polygon_tag type;
0039 };
0040
0041 template <typename CoordinateType>
0042 struct ring_const_type<boost::polygon::polygon_with_holes_data<CoordinateType> >
0043 {
0044 typedef adapt::bp::ring_proxy<boost::polygon::polygon_with_holes_data<CoordinateType> const> type;
0045 };
0046
0047 template <typename CoordinateType>
0048 struct ring_mutable_type<boost::polygon::polygon_with_holes_data<CoordinateType> >
0049 {
0050 typedef adapt::bp::ring_proxy<boost::polygon::polygon_with_holes_data<CoordinateType> > type;
0051 };
0052
0053 template <typename CoordinateType>
0054 struct interior_const_type<boost::polygon::polygon_with_holes_data<CoordinateType> >
0055 {
0056 typedef adapt::bp::holes_proxy<boost::polygon::polygon_with_holes_data<CoordinateType> const> type;
0057 };
0058
0059 template <typename CoordinateType>
0060 struct interior_mutable_type<boost::polygon::polygon_with_holes_data<CoordinateType> >
0061 {
0062 typedef adapt::bp::holes_proxy<boost::polygon::polygon_with_holes_data<CoordinateType> > type;
0063 };
0064
0065
0066 template <typename CoordinateType>
0067 struct exterior_ring<boost::polygon::polygon_with_holes_data<CoordinateType> >
0068 {
0069 typedef boost::polygon::polygon_with_holes_data<CoordinateType> polygon_type;
0070 typedef adapt::bp::ring_proxy<polygon_type> proxy;
0071 typedef adapt::bp::ring_proxy<polygon_type const> const_proxy;
0072
0073 static inline proxy get(polygon_type& p)
0074 {
0075 return proxy(p);
0076 }
0077
0078 static inline const_proxy get(polygon_type const& p)
0079 {
0080 return const_proxy(p);
0081 }
0082 };
0083
0084 template <typename CoordinateType>
0085 struct interior_rings<boost::polygon::polygon_with_holes_data<CoordinateType> >
0086 {
0087 typedef boost::polygon::polygon_with_holes_data<CoordinateType> polygon_type;
0088 typedef adapt::bp::holes_proxy<polygon_type> proxy;
0089 typedef adapt::bp::holes_proxy<polygon_type const> const_proxy;
0090
0091 static inline proxy get(polygon_type& p)
0092 {
0093 return proxy(p);
0094 }
0095
0096 static inline const_proxy get(polygon_type const& p)
0097 {
0098 return const_proxy(p);
0099 }
0100 };
0101
0102
0103
0104 }
0105 #endif
0106
0107 }}
0108
0109
0110 #endif
0111