|
||||
File indexing completed on 2025-01-18 09:35:28
0001 // Boost.Geometry (aka GGL, Generic Geometry Library) 0002 0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. 0004 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. 0005 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. 0006 // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. 0007 0008 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library 0009 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. 0010 0011 // Use, modification and distribution is subject to the Boost Software License, 0012 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0013 // http://www.boost.org/LICENSE_1_0.txt) 0014 0015 #ifndef BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP 0016 #define BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP 0017 0018 #include <memory> 0019 #include <vector> 0020 0021 #include <boost/concept/requires.hpp> 0022 0023 #include <boost/geometry/core/tags.hpp> 0024 #include <boost/geometry/geometries/concepts/linestring_concept.hpp> 0025 0026 #include <boost/config.hpp> 0027 0028 #include <initializer_list> 0029 0030 namespace boost { namespace geometry 0031 { 0032 0033 0034 namespace model 0035 { 0036 0037 /*! 0038 \brief multi_line, a collection of linestring 0039 \details Multi-linestring can be used to group lines belonging to each other, 0040 e.g. a highway (with interruptions) 0041 \ingroup geometries 0042 0043 \qbk{[include reference/geometries/multi_linestring.qbk]} 0044 \qbk{before.synopsis, 0045 [heading Model of] 0046 [link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept] 0047 } 0048 */ 0049 template 0050 < 0051 typename LineString, 0052 template<typename, typename> class Container = std::vector, 0053 template<typename> class Allocator = std::allocator 0054 > 0055 class multi_linestring : public Container<LineString, Allocator<LineString> > 0056 { 0057 BOOST_CONCEPT_ASSERT( (concepts::Linestring<LineString>) ); 0058 0059 // default constructor and base_type definitions are required only 0060 // if the constructor taking std::initializer_list is defined 0061 0062 typedef Container<LineString, Allocator<LineString> > base_type; 0063 0064 public: 0065 /// \constructor_default{multi_linestring} 0066 multi_linestring() 0067 : base_type() 0068 {} 0069 0070 /// \constructor_initializer_list{multi_linestring} 0071 inline multi_linestring(std::initializer_list<LineString> l) 0072 : base_type(l.begin(), l.end()) 0073 {} 0074 0075 // Commented out for now in order to support Boost.Assign 0076 // Without this assignment operator first the object should be created 0077 // from initializer list, then it shoudl be moved. 0078 //// Without this workaround in MSVC the assignment operator is ambiguous 0079 //#ifndef BOOST_MSVC 0080 // /// \assignment_initializer_list{multi_linestring} 0081 // inline multi_linestring & operator=(std::initializer_list<LineString> l) 0082 // { 0083 // base_type::assign(l.begin(), l.end()); 0084 // return *this; 0085 // } 0086 //#endif 0087 }; 0088 0089 0090 } // namespace model 0091 0092 0093 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS 0094 namespace traits 0095 { 0096 0097 template 0098 < 0099 typename LineString, 0100 template<typename, typename> class Container, 0101 template<typename> class Allocator 0102 > 0103 struct tag< model::multi_linestring<LineString, Container, Allocator> > 0104 { 0105 typedef multi_linestring_tag type; 0106 }; 0107 0108 } // namespace traits 0109 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS 0110 0111 0112 }} // namespace boost::geometry 0113 0114 #endif // BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |