Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef CIRCULARSTRING_DEF_H_INCLUDED
- #define CIRCULARSTRING_DEF_H_INCLUDED
- #include <boost/geometry/core/access.hpp>
- #include <boost/geometry/core/mutable_range.hpp>
- #include <boost/geometry/core/point_type.hpp>
- #include <boost/geometry/geometries/concepts/point_concept.hpp>
- #include <memory>
- #include <vector>
- #include <boost/concept/assert.hpp>
- #include <boost/range.hpp>
- #include <boost/geometry/core/tag.hpp>
- #include <boost/geometry/core/tags.hpp>
- #include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
- namespace boost
- {
- namespace geometry
- {
- /// Circularstring identifying tag
- struct circularstring_tag : single_tag {};
- // namespace concept
- //
- // {
- // template <typename Geometry>
- // class Circularstring
- // {
- // #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
- // typedef typename point_type<Geometry>::type point_type;
- //
- // BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
- // BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
- //
- // public :
- //
- // BOOST_CONCEPT_USAGE(Circularstring)
- // {
- // Geometry* ls = 0;
- // traits::clear<Geometry>::apply(*ls);
- // traits::resize<Geometry>::apply(*ls, 0);
- // point_type* point = 0;
- // traits::push_back<Geometry>::apply(*ls, *point);
- // }
- // #endif
- // };
- // }
- namespace model
- {
- template
- <
- typename Point,
- template<typename,typename> class Container = std::vector,
- template<typename> class Allocator = std::allocator
- >
- class circularstring : public Container<Point, Allocator<Point> >
- {
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
- typedef Container<Point, Allocator<Point> > base_type;
- public :
- /// \constructor_default{circularstring}
- inline circularstring()
- : base_type()
- {}
- /// \constructor_begin_end{circularstring}
- template <typename Iterator>
- inline circularstring(Iterator begin, Iterator end)
- : base_type(begin, end)
- {}
- };
- } // namespace model
- #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
- namespace traits
- {
- template
- <
- typename Point,
- template<typename,typename> class Container,
- template<typename> class Allocator
- >
- struct tag<model::circularstring<Point, Container, Allocator> >
- {
- typedef circularstring_tag type;
- };
- } // namespace traits
- #endif
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail
- {
- namespace wkt
- {
- struct prefix_circularstring_par
- {
- static inline const char* apply() { return "CIRCULARSTRING("; }
- };
- }
- } // namespace detail
- #endif
- #ifndef DOXYGEN_NO_DISPATCH
- namespace dispatch
- {
- template <typename Linestring>
- struct wkt<circularstring_tag, Linestring>
- : detail::wkt::wkt_range
- <
- Linestring,
- detail::wkt::prefix_circularstring_par,
- detail::wkt::closing_parenthesis
- >
- {};
- } // namespace dispatch
- #endif
- } //namespace geometry
- } // namespace boost
- #endif // CIRCULARSTRING_DEF_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement