Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/geometry/geometries/linestring.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 // Boost.Geometry (aka GGL, Generic Geometry Library) | |
2 | |
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. | |
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 #ifndef BOOST_GEOMETRY_GEOMETRIES_LINESTRING_HPP | |
15 #define BOOST_GEOMETRY_GEOMETRIES_LINESTRING_HPP | |
16 | |
17 #include <memory> | |
18 #include <vector> | |
19 | |
20 #include <boost/concept/assert.hpp> | |
21 #include <boost/range.hpp> | |
22 | |
23 #include <boost/geometry/core/tag.hpp> | |
24 #include <boost/geometry/core/tags.hpp> | |
25 | |
26 #include <boost/geometry/geometries/concepts/point_concept.hpp> | |
27 | |
28 | |
29 namespace boost { namespace geometry | |
30 { | |
31 | |
32 namespace model | |
33 { | |
34 | |
35 /*! | |
36 \brief A linestring (named so by OGC) is a collection (default a vector) of points. | |
37 \ingroup geometries | |
38 \tparam Point \tparam_point | |
39 \tparam Container \tparam_container | |
40 \tparam Allocator \tparam_allocator | |
41 | |
42 \qbk{before.synopsis, | |
43 [heading Model of] | |
44 [link geometry.reference.concepts.concept_linestring Linestring Concept] | |
45 } | |
46 | |
47 */ | |
48 template | |
49 < | |
50 typename Point, | |
51 template<typename,typename> class Container = std::vector, | |
52 template<typename> class Allocator = std::allocator | |
53 > | |
54 class linestring : public Container<Point, Allocator<Point> > | |
55 { | |
56 BOOST_CONCEPT_ASSERT( (concept::Point<Point>) ); | |
57 | |
58 typedef Container<Point, Allocator<Point> > base_type; | |
59 | |
60 public : | |
61 /// \constructor_default{linestring} | |
62 inline linestring() | |
63 : base_type() | |
64 {} | |
65 | |
66 /// \constructor_begin_end{linestring} | |
67 template <typename Iterator> | |
68 inline linestring(Iterator begin, Iterator end) | |
69 : base_type(begin, end) | |
70 {} | |
71 }; | |
72 | |
73 } // namespace model | |
74 | |
75 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS | |
76 namespace traits | |
77 { | |
78 | |
79 template | |
80 < | |
81 typename Point, | |
82 template<typename,typename> class Container, | |
83 template<typename> class Allocator | |
84 > | |
85 struct tag<model::linestring<Point, Container, Allocator> > | |
86 { | |
87 typedef linestring_tag type; | |
88 }; | |
89 } // namespace traits | |
90 | |
91 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS | |
92 | |
93 }} // namespace boost::geometry | |
94 | |
95 #endif // BOOST_GEOMETRY_GEOMETRIES_LINESTRING_HPP |