1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
10 // Use, modification and distribution is subject to the Boost Software License,
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
15 #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
16 #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
19 #include <boost/concept_check.hpp>
20 #include <boost/range/concepts.hpp>
21 #include <boost/range/metafunctions.hpp>
24 #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
27 namespace boost { namespace geometry { namespace concepts
32 \brief multi-linestring concept
34 \par Formal definition:
35 The multi linestring concept is defined as following:
36 - there must be a specialization of traits::tag defining multi_linestring_tag as
38 - it must behave like a Boost.Range
39 - its range value must fulfil the Linestring concept
42 template <typename Geometry>
45 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
46 typedef typename boost::range_value<Geometry>::type linestring_type;
48 BOOST_CONCEPT_ASSERT( (concepts::Linestring<linestring_type>) );
49 BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
54 BOOST_CONCEPT_USAGE(MultiLinestring)
57 traits::clear<Geometry>::apply(*mls);
58 traits::resize<Geometry>::apply(*mls, 0);
59 linestring_type* ls = 0;
60 traits::push_back<Geometry>::apply(*mls, *ls);
67 \brief concept for multi-linestring (const version)
68 \ingroup const_concepts
70 template <typename Geometry>
71 class ConstMultiLinestring
73 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
74 typedef typename boost::range_value<Geometry>::type linestring_type;
76 BOOST_CONCEPT_ASSERT( (concepts::ConstLinestring<linestring_type>) );
77 BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
82 BOOST_CONCEPT_USAGE(ConstMultiLinestring)
88 }}} // namespace boost::geometry::concepts
91 #endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP