12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
- #define BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
- #include <boost/concept_check.hpp>
- #include <boost/range/concepts.hpp>
- #include <boost/range/value_type.hpp>
- #include <boost/geometry/geometries/concepts/concept_type.hpp>
- #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
- namespace boost { namespace geometry { namespace concepts
- {
- template <typename Geometry>
- class MultiLinestring
- {
- #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
- typedef typename boost::range_value<Geometry>::type linestring_type;
- BOOST_CONCEPT_ASSERT( (concepts::Linestring<linestring_type>) );
- BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
- public :
- BOOST_CONCEPT_USAGE(MultiLinestring)
- {
- Geometry* mls = 0;
- traits::clear<Geometry>::apply(*mls);
- traits::resize<Geometry>::apply(*mls, 0);
- linestring_type* ls = 0;
- traits::push_back<Geometry>::apply(*mls, std::move(*ls));
- }
- #endif
- };
- template <typename Geometry>
- class ConstMultiLinestring
- {
- #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
- typedef typename boost::range_value<Geometry>::type linestring_type;
- BOOST_CONCEPT_ASSERT( (concepts::ConstLinestring<linestring_type>) );
- BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
- public :
- BOOST_CONCEPT_USAGE(ConstMultiLinestring)
- {
- }
- #endif
- };
- template <typename Geometry>
- struct concept_type<Geometry, multi_linestring_tag>
- {
- using type = MultiLinestring<Geometry>;
- };
- template <typename Geometry>
- struct concept_type<Geometry const, multi_linestring_tag>
- {
- using type = ConstMultiLinestring<Geometry>;
- };
- }}}
- #endif
|