File indexing completed on 2025-01-18 09:35:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
0020 #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
0021
0022
0023 #include <boost/concept_check.hpp>
0024 #include <boost/range/concepts.hpp>
0025 #include <boost/range/value_type.hpp>
0026
0027 #include <boost/geometry/core/mutable_range.hpp>
0028
0029 #include <boost/geometry/geometries/concepts/concept_type.hpp>
0030 #include <boost/geometry/geometries/concepts/point_concept.hpp>
0031
0032
0033 namespace boost { namespace geometry { namespace concepts
0034 {
0035
0036 template <typename Geometry>
0037 class MultiPoint
0038 {
0039 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
0040 typedef typename boost::range_value<Geometry>::type point_type;
0041
0042 BOOST_CONCEPT_ASSERT( (concepts::Point<point_type>) );
0043 BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
0044
0045
0046 public :
0047
0048 BOOST_CONCEPT_USAGE(MultiPoint)
0049 {
0050 Geometry* mp = 0;
0051 traits::clear<Geometry>::apply(*mp);
0052 traits::resize<Geometry>::apply(*mp, 0);
0053 point_type* point = 0;
0054 traits::push_back<Geometry>::apply(*mp, *point);
0055 }
0056 #endif
0057 };
0058
0059
0060
0061
0062
0063
0064 template <typename Geometry>
0065 class ConstMultiPoint
0066 {
0067 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
0068 typedef typename boost::range_value<Geometry>::type point_type;
0069
0070 BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point_type>) );
0071 BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
0072
0073
0074 public :
0075
0076 BOOST_CONCEPT_USAGE(ConstMultiPoint)
0077 {
0078 }
0079 #endif
0080 };
0081
0082
0083 template <typename Geometry>
0084 struct concept_type<Geometry, multi_point_tag>
0085 {
0086 using type = MultiPoint<Geometry>;
0087 };
0088
0089 template <typename Geometry>
0090 struct concept_type<Geometry const, multi_point_tag>
0091 {
0092 using type = ConstMultiPoint<Geometry>;
0093 };
0094
0095
0096 }}}
0097
0098
0099 #endif