3 // Copyright (c) 2021, Oracle and/or its affiliates.
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP
11 #define BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP
15 #include <boost/geometry/core/tag.hpp>
16 #include <boost/geometry/core/tags.hpp>
18 namespace boost { namespace geometry
25 \brief Basic geometry_collection class representing a container of DynamicGeometries.
27 \tparam DynamicGeometry Type adapted to DynamicGeometry Concept.
28 \tparam Container \tparam_container
29 \tparam Allocator \tparam_allocator
33 typename DynamicGeometry,
34 template <typename, typename> class Container = std::vector,
35 template <typename> class Allocator = std::allocator
37 class geometry_collection
38 : public Container<DynamicGeometry, Allocator<DynamicGeometry>>
40 typedef Container<DynamicGeometry, Allocator<DynamicGeometry>> base_type;
43 geometry_collection() = default;
45 geometry_collection(std::initializer_list<DynamicGeometry> l)
46 : base_type(l.begin(), l.end())
53 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
59 typename DynamicGeometry,
60 template <typename, typename> class Container,
61 template <typename> class Allocator
63 struct tag<model::geometry_collection<DynamicGeometry, Container, Allocator>>
65 using type = geometry_collection_tag;
69 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
72 }} // namespace boost::geometry
74 #endif // BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP