]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/geometries/geometry_collection.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / geometries / geometry_collection.hpp
1 // Boost.Geometry
2
3 // Copyright (c) 2021, Oracle and/or its affiliates.
4
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9
10 #ifndef BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP
11 #define BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP
12
13 #include <vector>
14
15 #include <boost/geometry/core/tag.hpp>
16 #include <boost/geometry/core/tags.hpp>
17
18 namespace boost { namespace geometry
19 {
20
21 namespace model
22 {
23
24 /*!
25 \brief Basic geometry_collection class representing a container of DynamicGeometries.
26 \ingroup geometries
27 \tparam DynamicGeometry Type adapted to DynamicGeometry Concept.
28 \tparam Container \tparam_container
29 \tparam Allocator \tparam_allocator
30 */
31 template
32 <
33 typename DynamicGeometry,
34 template <typename, typename> class Container = std::vector,
35 template <typename> class Allocator = std::allocator
36 >
37 class geometry_collection
38 : public Container<DynamicGeometry, Allocator<DynamicGeometry>>
39 {
40 typedef Container<DynamicGeometry, Allocator<DynamicGeometry>> base_type;
41
42 public:
43 geometry_collection() = default;
44
45 geometry_collection(std::initializer_list<DynamicGeometry> l)
46 : base_type(l.begin(), l.end())
47 {}
48 };
49
50 } // namespace model
51
52
53 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
54 namespace traits
55 {
56
57 template
58 <
59 typename DynamicGeometry,
60 template <typename, typename> class Container,
61 template <typename> class Allocator
62 >
63 struct tag<model::geometry_collection<DynamicGeometry, Container, Allocator>>
64 {
65 using type = geometry_collection_tag;
66 };
67
68 } // namespace traits
69 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
70
71
72 }} // namespace boost::geometry
73
74 #endif // BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP