Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:28

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2021, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0006 
0007 // Licensed under the Boost Software License version 1.0.
0008 // http://www.boost.org/users/license.html
0009 
0010 #ifndef BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP
0011 #define BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP
0012 
0013 #include <vector>
0014 
0015 #include <boost/geometry/core/tag.hpp>
0016 #include <boost/geometry/core/tags.hpp>
0017 
0018 namespace boost { namespace geometry
0019 {
0020 
0021 namespace model
0022 {
0023 
0024 /*!
0025 \brief Basic geometry_collection class representing a container of DynamicGeometries.
0026 \ingroup geometries
0027 \tparam DynamicGeometry Type adapted to DynamicGeometry Concept.
0028 \tparam Container \tparam_container
0029 \tparam Allocator \tparam_allocator
0030 */
0031 template
0032 <
0033     typename DynamicGeometry,
0034     template <typename, typename> class Container = std::vector,
0035     template <typename> class Allocator = std::allocator
0036 >
0037 class geometry_collection
0038     : public Container<DynamicGeometry, Allocator<DynamicGeometry>>
0039 {
0040     typedef Container<DynamicGeometry, Allocator<DynamicGeometry>> base_type;
0041 
0042 public:
0043     geometry_collection() = default;
0044 
0045     geometry_collection(std::initializer_list<DynamicGeometry> l)
0046         : base_type(l.begin(), l.end())
0047     {}
0048 };
0049 
0050 } // namespace model
0051 
0052 
0053 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
0054 namespace traits
0055 {
0056 
0057 template
0058 <
0059     typename DynamicGeometry,
0060     template <typename, typename> class Container,
0061     template <typename> class Allocator
0062 >
0063 struct tag<model::geometry_collection<DynamicGeometry, Container, Allocator>>
0064 {
0065     using type = geometry_collection_tag;
0066 };
0067 
0068 } // namespace traits
0069 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
0070 
0071 
0072 }} // namespace boost::geometry
0073 
0074 #endif // BOOST_GEOMETRY_GEOMETRIES_GEOMETRY_COLLECTION_HPP