Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/geometry/geometries/multi_point.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_POINT_HPP | |
16 #define BOOST_GEOMETRY_GEOMETRIES_MULTI_POINT_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/point_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 namespace model | |
37 { | |
38 | |
39 | |
40 /*! | |
41 \brief multi_point, a collection of points | |
42 \ingroup geometries | |
43 \tparam Point \tparam_point | |
44 \tparam Container \tparam_container | |
45 \tparam Allocator \tparam_allocator | |
46 \details Multipoint can be used to group points belonging to each other, | |
47 e.g. a constellation, or the result set of an intersection | |
48 \qbk{before.synopsis, | |
49 [heading Model of] | |
50 [link geometry.reference.concepts.concept_multi_point MultiPoint Concept] | |
51 } | |
52 */ | |
53 template | |
54 < | |
55 typename Point, | |
56 template<typename, typename> class Container = std::vector, | |
57 template<typename> class Allocator = std::allocator | |
58 > | |
59 class multi_point : public Container<Point, Allocator<Point> > | |
60 { | |
61 BOOST_CONCEPT_ASSERT( (concept::Point<Point>) ); | |
62 | |
63 typedef Container<Point, Allocator<Point> > base_type; | |
64 | |
65 public : | |
66 /// \constructor_default{multi_point} | |
67 inline multi_point() | |
68 : base_type() | |
69 {} | |
70 | |
71 /// \constructor_begin_end{multi_point} | |
72 template <typename Iterator> | |
73 inline multi_point(Iterator begin, Iterator end) | |
74 : base_type(begin, end) | |
75 {} | |
76 | |
77 #ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST | |
78 #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST | |
79 | |
80 /// \constructor_initializer_list{multi_point} | |
81 inline multi_point(std::initializer_list<Point> l) | |
82 : base_type(l.begin(), l.end()) | |
83 {} | |
84 | |
85 // Commented out for now in order to support Boost.Assign | |
86 // Without this assignment operator first the object should be created | |
87 // from initializer list, then it shoudl be moved. | |
88 //// Without this workaround in MSVC the assignment operator is ambiguous | |
89 //#ifndef BOOST_MSVC | |
90 // /// \assignment_initializer_list{multi_point} | |
91 // inline multi_point & operator=(std::initializer_list<Point> l) | |
92 // { | |
93 // base_type::assign(l.begin(), l.end()); | |
94 // return *this; | |
95 // } | |
96 //#endif | |
97 | |
98 #endif | |
99 #endif | |
100 }; | |
101 | |
102 } // namespace model | |
103 | |
104 | |
105 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS | |
106 namespace traits | |
107 { | |
108 | |
109 template | |
110 < | |
111 typename Point, | |
112 template<typename, typename> class Container, | |
113 template<typename> class Allocator | |
114 > | |
115 struct tag< model::multi_point<Point, Container, Allocator> > | |
116 { | |
117 typedef multi_point_tag type; | |
118 }; | |
119 | |
120 } // namespace traits | |
121 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS | |
122 | |
123 }} // namespace boost::geometry | |
124 | |
125 #endif // BOOST_GEOMETRY_GEOMETRIES_MULTI_POINT_HPP |