|
Boost Users : |
Subject: Re: [Boost-users] [geometry] problems with the ring concept
From: Barend Gehrels (barend_at_[hidden])
Date: 2013-08-25 04:13:02
Hi,
On 24-8-2013 18:07, Lepere Renaud wrote:
>
> I have an existing geometric structure, and i try to make it usable
> with boost geometry. I read the documentation for a similar problem
> but i did not success
>
http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/examples/example__adapting_a_legacy_geometry_object_model.html
>
>
>
My Ring structure is very simple :
> typedef std::vector< Point > Points; struct Ring { Points points; };
>
> void f() { boost::geometry::concept::check< Geom::Ring >(); } show
> failure since apparently my range does not support a clear() method
> correctly.
>
The concepts you defined are for readonly rings. If you check
<Geom::Ring *const*>, it should succeed.
Mutable rings should have clear, resize, push_back too. It is indeed
missing in the docs, especially here,
http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/reference/concepts/concept_ring.html
will be added.
Regards, Barend
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net