Chris@16
|
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
|
Chris@16
|
2
|
Chris@16
|
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
Chris@16
|
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
Chris@16
|
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
Chris@16
|
6
|
Chris@16
|
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
Chris@16
|
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
Chris@16
|
9
|
Chris@16
|
10 // Use, modification and distribution is subject to the Boost Software License,
|
Chris@16
|
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
12 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
13
|
Chris@16
|
14 #ifndef BOOST_GEOMETRY_GEOMETRIES_LINESTRING_HPP
|
Chris@16
|
15 #define BOOST_GEOMETRY_GEOMETRIES_LINESTRING_HPP
|
Chris@16
|
16
|
Chris@16
|
17 #include <memory>
|
Chris@16
|
18 #include <vector>
|
Chris@16
|
19
|
Chris@16
|
20 #include <boost/concept/assert.hpp>
|
Chris@16
|
21 #include <boost/range.hpp>
|
Chris@16
|
22
|
Chris@16
|
23 #include <boost/geometry/core/tag.hpp>
|
Chris@16
|
24 #include <boost/geometry/core/tags.hpp>
|
Chris@16
|
25
|
Chris@16
|
26 #include <boost/geometry/geometries/concepts/point_concept.hpp>
|
Chris@16
|
27
|
Chris@16
|
28
|
Chris@16
|
29 namespace boost { namespace geometry
|
Chris@16
|
30 {
|
Chris@16
|
31
|
Chris@16
|
32 namespace model
|
Chris@16
|
33 {
|
Chris@16
|
34
|
Chris@16
|
35 /*!
|
Chris@16
|
36 \brief A linestring (named so by OGC) is a collection (default a vector) of points.
|
Chris@16
|
37 \ingroup geometries
|
Chris@16
|
38 \tparam Point \tparam_point
|
Chris@16
|
39 \tparam Container \tparam_container
|
Chris@16
|
40 \tparam Allocator \tparam_allocator
|
Chris@16
|
41
|
Chris@16
|
42 \qbk{before.synopsis,
|
Chris@16
|
43 [heading Model of]
|
Chris@16
|
44 [link geometry.reference.concepts.concept_linestring Linestring Concept]
|
Chris@16
|
45 }
|
Chris@16
|
46
|
Chris@16
|
47 */
|
Chris@16
|
48 template
|
Chris@16
|
49 <
|
Chris@16
|
50 typename Point,
|
Chris@16
|
51 template<typename,typename> class Container = std::vector,
|
Chris@16
|
52 template<typename> class Allocator = std::allocator
|
Chris@16
|
53 >
|
Chris@16
|
54 class linestring : public Container<Point, Allocator<Point> >
|
Chris@16
|
55 {
|
Chris@16
|
56 BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
|
Chris@16
|
57
|
Chris@16
|
58 typedef Container<Point, Allocator<Point> > base_type;
|
Chris@16
|
59
|
Chris@16
|
60 public :
|
Chris@16
|
61 /// \constructor_default{linestring}
|
Chris@16
|
62 inline linestring()
|
Chris@16
|
63 : base_type()
|
Chris@16
|
64 {}
|
Chris@16
|
65
|
Chris@16
|
66 /// \constructor_begin_end{linestring}
|
Chris@16
|
67 template <typename Iterator>
|
Chris@16
|
68 inline linestring(Iterator begin, Iterator end)
|
Chris@16
|
69 : base_type(begin, end)
|
Chris@16
|
70 {}
|
Chris@16
|
71 };
|
Chris@16
|
72
|
Chris@16
|
73 } // namespace model
|
Chris@16
|
74
|
Chris@16
|
75 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
Chris@16
|
76 namespace traits
|
Chris@16
|
77 {
|
Chris@16
|
78
|
Chris@16
|
79 template
|
Chris@16
|
80 <
|
Chris@16
|
81 typename Point,
|
Chris@16
|
82 template<typename,typename> class Container,
|
Chris@16
|
83 template<typename> class Allocator
|
Chris@16
|
84 >
|
Chris@16
|
85 struct tag<model::linestring<Point, Container, Allocator> >
|
Chris@16
|
86 {
|
Chris@16
|
87 typedef linestring_tag type;
|
Chris@16
|
88 };
|
Chris@16
|
89 } // namespace traits
|
Chris@16
|
90
|
Chris@16
|
91 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
Chris@16
|
92
|
Chris@16
|
93 }} // namespace boost::geometry
|
Chris@16
|
94
|
Chris@16
|
95 #endif // BOOST_GEOMETRY_GEOMETRIES_LINESTRING_HPP
|