Boost logo

Boost Users :

Subject: Re: [Boost-users] [geometry][ggl] boost array adapted mechanism
From: Alfredo Correa (correaa_at_[hidden])
Date: 2010-10-27 05:24:11


Hi Barend,

On Wed, Oct 27, 2010 at 1:15 AM, Barend Gehrels <barend_at_[hidden]> wrote:

> In other words, why there is not
>> boost/geometry/geometries/adapted/boost_array_cartesian.hpp
>> ?
>>
>
>
> Yes, not yet there and it is a good idea.
>

good, some times I ask just to not repeat code and to understand better the
library.

> And it indeed this adaptation of boost::array is not included in the
>> library, what steps should I follow to make a boost::array adapted to
>> GGL?
>>
>
> Adapting to the Point Concept is necessary, which is actually not hard.
> Most samples use registration macro's, which is probably not possible here.
> So perhaps the c05_custom_point_pointer_example.cpp gives the idea.
> Basically you have to specialize the tag, coordinate_type,
> coordinate_system, dimension metafunctions (all trivial) and the access
> structure, also not too hard.
>
> In case you start with this, I'm interested in the result, for
> incorporation. Otherwise it will probably be included as well but then it
> might take longer.
>

sure, you will find these files attached:

boost/geometry/geometries/adapted/boost_array.hpp
boost/geometry/geometries/adapted/boost_array_cartesian.hpp
boost/geometry/geometries/adapted/boost_array_geographic.hpp
and
geometry_boost_array_test.cpp

Feel free to incorporate it in Boost.Geometry. I am working in a fusion
adapter too. This is very useful to me because I do most of the (cartesian)
geometry related stuff with boost::array<double, N>

Thank you,
Alfredo








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