multi_linestring.hpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
  5. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  6. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  7. // Use, modification and distribution is subject to the Boost Software License,
  8. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_GEOMETRY_MULTI_GEOMETRIES_LINESTRING_HPP
  11. #define BOOST_GEOMETRY_MULTI_GEOMETRIES_LINESTRING_HPP
  12. #include <memory>
  13. #include <vector>
  14. #include <boost/concept/requires.hpp>
  15. #include <boost/geometry/geometries/concepts/linestring_concept.hpp>
  16. #include <boost/geometry/multi/core/tags.hpp>
  17. namespace boost { namespace geometry
  18. {
  19. namespace model
  20. {
  21. /*!
  22. \brief multi_line, a collection of linestring
  23. \details Multi-linestring can be used to group lines belonging to each other,
  24. e.g. a highway (with interruptions)
  25. \ingroup geometries
  26. \qbk{before.synopsis,
  27. [heading Model of]
  28. [link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept]
  29. }
  30. */
  31. template
  32. <
  33. typename LineString,
  34. template<typename, typename> class Container = std::vector,
  35. template<typename> class Allocator = std::allocator
  36. >
  37. class multi_linestring : public Container<LineString, Allocator<LineString> >
  38. {
  39. BOOST_CONCEPT_ASSERT( (concept::Linestring<LineString>) );
  40. };
  41. } // namespace model
  42. #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
  43. namespace traits
  44. {
  45. template
  46. <
  47. typename LineString,
  48. template<typename, typename> class Container,
  49. template<typename> class Allocator
  50. >
  51. struct tag< model::multi_linestring<LineString, Container, Allocator> >
  52. {
  53. typedef multi_linestring_tag type;
  54. };
  55. } // namespace traits
  56. #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
  57. }} // namespace boost::geometry
  58. #endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_LINESTRING_HPP