annotate DEPENDENCIES/generic/include/boost/geometry/geometries/concepts/multi_point_concept.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents f46d142149f5
children
rev   line source
Chris@102 1 // Boost.Geometry (aka GGL, Generic Geometry Library)
Chris@102 2
Chris@102 3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
Chris@102 4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
Chris@102 5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
Chris@102 6
Chris@102 7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
Chris@102 8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
Chris@102 9
Chris@102 10 // Use, modification and distribution is subject to the Boost Software License,
Chris@102 11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@102 12 // http://www.boost.org/LICENSE_1_0.txt)
Chris@102 13
Chris@102 14
Chris@102 15 #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
Chris@102 16 #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
Chris@102 17
Chris@102 18
Chris@102 19 #include <boost/concept_check.hpp>
Chris@102 20 #include <boost/range/concepts.hpp>
Chris@102 21 #include <boost/range/metafunctions.hpp>
Chris@102 22
Chris@102 23
Chris@102 24 #include <boost/geometry/geometries/concepts/point_concept.hpp>
Chris@102 25
Chris@102 26
Chris@102 27 namespace boost { namespace geometry { namespace concept
Chris@102 28 {
Chris@102 29
Chris@102 30
Chris@102 31 /*!
Chris@102 32 \brief MultiPoint concept
Chris@102 33 \ingroup concepts
Chris@102 34 \par Formal definition:
Chris@102 35 The multi point concept is defined as following:
Chris@102 36 - there must be a specialization of traits::tag defining multi_point_tag as type
Chris@102 37 - it must behave like a Boost.Range
Chris@102 38 - its range value must fulfil the Point concept
Chris@102 39
Chris@102 40 */
Chris@102 41 template <typename Geometry>
Chris@102 42 class MultiPoint
Chris@102 43 {
Chris@102 44 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
Chris@102 45 typedef typename boost::range_value<Geometry>::type point_type;
Chris@102 46
Chris@102 47 BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
Chris@102 48 BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
Chris@102 49
Chris@102 50
Chris@102 51 public :
Chris@102 52
Chris@102 53 BOOST_CONCEPT_USAGE(MultiPoint)
Chris@102 54 {
Chris@102 55 Geometry* mp = 0;
Chris@102 56 traits::clear<Geometry>::apply(*mp);
Chris@102 57 traits::resize<Geometry>::apply(*mp, 0);
Chris@102 58 point_type* point = 0;
Chris@102 59 traits::push_back<Geometry>::apply(*mp, *point);
Chris@102 60 }
Chris@102 61 #endif
Chris@102 62 };
Chris@102 63
Chris@102 64
Chris@102 65 /*!
Chris@102 66 \brief concept for multi-point (const version)
Chris@102 67 \ingroup const_concepts
Chris@102 68 */
Chris@102 69 template <typename Geometry>
Chris@102 70 class ConstMultiPoint
Chris@102 71 {
Chris@102 72 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
Chris@102 73 typedef typename boost::range_value<Geometry>::type point_type;
Chris@102 74
Chris@102 75 BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
Chris@102 76 BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
Chris@102 77
Chris@102 78
Chris@102 79 public :
Chris@102 80
Chris@102 81 BOOST_CONCEPT_USAGE(ConstMultiPoint)
Chris@102 82 {
Chris@102 83 }
Chris@102 84 #endif
Chris@102 85 };
Chris@102 86
Chris@102 87 }}} // namespace boost::geometry::concept
Chris@102 88
Chris@102 89
Chris@102 90 #endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP