comparison DEPENDENCIES/generic/include/boost/geometry/geometries/multi_linestring.hpp @ 102:f46d142149f5

Whoops, finish that update
author Chris Cannam
date Mon, 07 Sep 2015 11:13:41 +0100
parents
children
comparison
equal deleted inserted replaced
101:c530137014c0 102:f46d142149f5
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 // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
7
8 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
9 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
10
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14
15 #ifndef BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP
16 #define BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP
17
18 #include <memory>
19 #include <vector>
20
21 #include <boost/concept/requires.hpp>
22
23 #include <boost/geometry/core/tags.hpp>
24 #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
25
26 #ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST
27 #include <boost/config.hpp>
28 #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
29 #include <initializer_list>
30 #endif
31 #endif
32
33 namespace boost { namespace geometry
34 {
35
36
37 namespace model
38 {
39
40 /*!
41 \brief multi_line, a collection of linestring
42 \details Multi-linestring can be used to group lines belonging to each other,
43 e.g. a highway (with interruptions)
44 \ingroup geometries
45
46 \qbk{before.synopsis,
47 [heading Model of]
48 [link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept]
49 }
50 */
51 template
52 <
53 typename LineString,
54 template<typename, typename> class Container = std::vector,
55 template<typename> class Allocator = std::allocator
56 >
57 class multi_linestring : public Container<LineString, Allocator<LineString> >
58 {
59 BOOST_CONCEPT_ASSERT( (concept::Linestring<LineString>) );
60
61 #ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST
62
63 typedef Container<LineString, Allocator<LineString> > base_type;
64
65 public:
66 /// \constructor_default{multi_linestring}
67 multi_linestring()
68 : base_type()
69 {}
70
71 #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
72
73 /// \constructor_initializer_list{multi_linestring}
74 inline multi_linestring(std::initializer_list<LineString> l)
75 : base_type(l.begin(), l.end())
76 {}
77
78 // Commented out for now in order to support Boost.Assign
79 // Without this assignment operator first the object should be created
80 // from initializer list, then it shoudl be moved.
81 //// Without this workaround in MSVC the assignment operator is ambiguous
82 //#ifndef BOOST_MSVC
83 // /// \assignment_initializer_list{multi_linestring}
84 // inline multi_linestring & operator=(std::initializer_list<LineString> l)
85 // {
86 // base_type::assign(l.begin(), l.end());
87 // return *this;
88 // }
89 //#endif
90
91 #endif
92 #endif
93 };
94
95
96 } // namespace model
97
98
99 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
100 namespace traits
101 {
102
103 template
104 <
105 typename LineString,
106 template<typename, typename> class Container,
107 template<typename> class Allocator
108 >
109 struct tag< model::multi_linestring<LineString, Container, Allocator> >
110 {
111 typedef multi_linestring_tag type;
112 };
113
114 } // namespace traits
115 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
116
117
118 }} // namespace boost::geometry
119
120 #endif // BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP