Chris@102: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@102: Chris@102: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@102: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@102: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@102: // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. Chris@102: Chris@102: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@102: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@102: Chris@102: // Use, modification and distribution is subject to the Boost Software License, Chris@102: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: Chris@102: #ifndef BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP Chris@102: #define BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP Chris@102: Chris@102: #include Chris@102: #include Chris@102: Chris@102: #include Chris@102: Chris@102: #include Chris@102: #include Chris@102: Chris@102: #ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST Chris@102: #include Chris@102: #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@102: #include Chris@102: #endif Chris@102: #endif Chris@102: Chris@102: namespace boost { namespace geometry Chris@102: { Chris@102: Chris@102: Chris@102: namespace model Chris@102: { Chris@102: Chris@102: /*! Chris@102: \brief multi_line, a collection of linestring Chris@102: \details Multi-linestring can be used to group lines belonging to each other, Chris@102: e.g. a highway (with interruptions) Chris@102: \ingroup geometries Chris@102: Chris@102: \qbk{before.synopsis, Chris@102: [heading Model of] Chris@102: [link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept] Chris@102: } Chris@102: */ Chris@102: template Chris@102: < Chris@102: typename LineString, Chris@102: template class Container = std::vector, Chris@102: template class Allocator = std::allocator Chris@102: > Chris@102: class multi_linestring : public Container > Chris@102: { Chris@102: BOOST_CONCEPT_ASSERT( (concept::Linestring) ); Chris@102: Chris@102: #ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST Chris@102: Chris@102: typedef Container > base_type; Chris@102: Chris@102: public: Chris@102: /// \constructor_default{multi_linestring} Chris@102: multi_linestring() Chris@102: : base_type() Chris@102: {} Chris@102: Chris@102: #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@102: Chris@102: /// \constructor_initializer_list{multi_linestring} Chris@102: inline multi_linestring(std::initializer_list l) Chris@102: : base_type(l.begin(), l.end()) Chris@102: {} Chris@102: Chris@102: // Commented out for now in order to support Boost.Assign Chris@102: // Without this assignment operator first the object should be created Chris@102: // from initializer list, then it shoudl be moved. Chris@102: //// Without this workaround in MSVC the assignment operator is ambiguous Chris@102: //#ifndef BOOST_MSVC Chris@102: // /// \assignment_initializer_list{multi_linestring} Chris@102: // inline multi_linestring & operator=(std::initializer_list l) Chris@102: // { Chris@102: // base_type::assign(l.begin(), l.end()); Chris@102: // return *this; Chris@102: // } Chris@102: //#endif Chris@102: Chris@102: #endif Chris@102: #endif Chris@102: }; Chris@102: Chris@102: Chris@102: } // namespace model Chris@102: Chris@102: Chris@102: #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS Chris@102: namespace traits Chris@102: { Chris@102: Chris@102: template Chris@102: < Chris@102: typename LineString, Chris@102: template class Container, Chris@102: template class Allocator Chris@102: > Chris@102: struct tag< model::multi_linestring > Chris@102: { Chris@102: typedef multi_linestring_tag type; Chris@102: }; Chris@102: Chris@102: } // namespace traits Chris@102: #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS Chris@102: Chris@102: Chris@102: }} // namespace boost::geometry Chris@102: Chris@102: #endif // BOOST_GEOMETRY_GEOMETRIES_MULTI_LINESTRING_HPP