]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / geometry / multi / geometries / concepts / multi_linestring_concept.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
6
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
9
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)
13
14
15 #ifndef BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
16 #define BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
17
18
19 #include <boost/concept_check.hpp>
20 #include <boost/range/concepts.hpp>
21 #include <boost/range/metafunctions.hpp>
22
23
24 #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
25
26
27 namespace boost { namespace geometry { namespace concept
28 {
29
30
31 /*!
32 \brief multi-linestring concept
33 \ingroup concepts
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
37   type
38 - it must behave like a Boost.Range
39 - its range value must fulfil the Linestring concept
40
41 */
42 template <typename Geometry>
43 class MultiLinestring
44 {
45 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
46     typedef typename boost::range_value<Geometry>::type linestring_type;
47
48     BOOST_CONCEPT_ASSERT( (concept::Linestring<linestring_type>) );
49     BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
50
51
52 public :
53
54     BOOST_CONCEPT_USAGE(MultiLinestring)
55     {
56     }
57 #endif
58 };
59
60
61 /*!
62 \brief concept for multi-linestring (const version)
63 \ingroup const_concepts
64 */
65 template <typename Geometry>
66 class ConstMultiLinestring
67 {
68 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
69     typedef typename boost::range_value<Geometry>::type linestring_type;
70
71     BOOST_CONCEPT_ASSERT( (concept::ConstLinestring<linestring_type>) );
72     BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
73
74
75 public :
76
77     BOOST_CONCEPT_USAGE(ConstMultiLinestring)
78     {
79     }
80 #endif
81 };
82
83 }}} // namespace boost::geometry::concept
84
85
86 #endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP