Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0007 // This file was modified by Oracle on 2020-2021.
0008 // Modifications copyright (c) 2020-2021 Oracle and/or its affiliates.
0009 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0010 
0011 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0012 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0013 
0014 // Use, modification and distribution is subject to the Boost Software License,
0015 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0016 // http://www.boost.org/LICENSE_1_0.txt)
0017 
0018 
0019 #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
0020 #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
0021 
0022 
0023 #include <boost/concept_check.hpp>
0024 #include <boost/range/concepts.hpp>
0025 #include <boost/range/value_type.hpp>
0026 
0027 #include <boost/geometry/geometries/concepts/concept_type.hpp>
0028 #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
0029 
0030 
0031 namespace boost { namespace geometry { namespace concepts
0032 {
0033 
0034 template <typename Geometry>
0035 class MultiLinestring
0036 {
0037 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
0038     typedef typename boost::range_value<Geometry>::type linestring_type;
0039 
0040     BOOST_CONCEPT_ASSERT( (concepts::Linestring<linestring_type>) );
0041     BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
0042 
0043 
0044 public :
0045 
0046     BOOST_CONCEPT_USAGE(MultiLinestring)
0047     {
0048         Geometry* mls = 0;
0049         traits::clear<Geometry>::apply(*mls);
0050         traits::resize<Geometry>::apply(*mls, 0);
0051         linestring_type* ls = 0;
0052         traits::push_back<Geometry>::apply(*mls, std::move(*ls));
0053     }
0054 #endif
0055 };
0056 
0057 
0058 /*!
0059 \brief concept for multi-linestring (const version)
0060 \ingroup const_concepts
0061 */
0062 template <typename Geometry>
0063 class ConstMultiLinestring
0064 {
0065 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
0066     typedef typename boost::range_value<Geometry>::type linestring_type;
0067 
0068     BOOST_CONCEPT_ASSERT( (concepts::ConstLinestring<linestring_type>) );
0069     BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
0070 
0071 
0072 public :
0073 
0074     BOOST_CONCEPT_USAGE(ConstMultiLinestring)
0075     {
0076     }
0077 #endif
0078 };
0079 
0080 
0081 template <typename Geometry>
0082 struct concept_type<Geometry, multi_linestring_tag>
0083 {
0084     using type = MultiLinestring<Geometry>;
0085 };
0086 
0087 template <typename Geometry>
0088 struct concept_type<Geometry const, multi_linestring_tag>
0089 {
0090     using type = ConstMultiLinestring<Geometry>;
0091 };
0092 
0093 
0094 }}} // namespace boost::geometry::concepts
0095 
0096 
0097 #endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP