Chris@102: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@102: Chris@102: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@102: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@102: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@102: Chris@102: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@102: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@102: Chris@102: // Use, modification and distribution is subject to the Boost Software License, Chris@102: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: Chris@102: Chris@102: #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP Chris@102: #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP Chris@102: Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: Chris@102: #include Chris@102: Chris@102: Chris@102: namespace boost { namespace geometry { namespace concept Chris@102: { Chris@102: Chris@102: Chris@102: /*! Chris@102: \brief MultiPoint concept Chris@102: \ingroup concepts Chris@102: \par Formal definition: Chris@102: The multi point concept is defined as following: Chris@102: - there must be a specialization of traits::tag defining multi_point_tag as type Chris@102: - it must behave like a Boost.Range Chris@102: - its range value must fulfil the Point concept Chris@102: Chris@102: */ Chris@102: template Chris@102: class MultiPoint Chris@102: { Chris@102: #ifndef DOXYGEN_NO_CONCEPT_MEMBERS Chris@102: typedef typename boost::range_value::type point_type; Chris@102: Chris@102: BOOST_CONCEPT_ASSERT( (concept::Point) ); Chris@102: BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept) ); Chris@102: Chris@102: Chris@102: public : Chris@102: Chris@102: BOOST_CONCEPT_USAGE(MultiPoint) Chris@102: { Chris@102: Geometry* mp = 0; Chris@102: traits::clear::apply(*mp); Chris@102: traits::resize::apply(*mp, 0); Chris@102: point_type* point = 0; Chris@102: traits::push_back::apply(*mp, *point); Chris@102: } Chris@102: #endif Chris@102: }; Chris@102: Chris@102: Chris@102: /*! Chris@102: \brief concept for multi-point (const version) Chris@102: \ingroup const_concepts Chris@102: */ Chris@102: template Chris@102: class ConstMultiPoint Chris@102: { Chris@102: #ifndef DOXYGEN_NO_CONCEPT_MEMBERS Chris@102: typedef typename boost::range_value::type point_type; Chris@102: Chris@102: BOOST_CONCEPT_ASSERT( (concept::ConstPoint) ); Chris@102: BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept) ); Chris@102: Chris@102: Chris@102: public : Chris@102: Chris@102: BOOST_CONCEPT_USAGE(ConstMultiPoint) Chris@102: { Chris@102: } Chris@102: #endif Chris@102: }; Chris@102: Chris@102: }}} // namespace boost::geometry::concept Chris@102: Chris@102: Chris@102: #endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP