Boost logo

Geometry :

Subject: [ggl] [doc] Index template parameters for get/set accessors?
From: Barend Gehrels (Barend.Gehrels)
Date: 2010-03-08 04:19:50


Hi Mateusz,

Mateusz Loskot wrote:
> Mateusz Loskot wrote:
>
>> Hi,
>>
>> For get/set functions in access.hpp, there is template parameters Index
>> documented but none of the get/set prototypes make use of it.
>>
>> For example, get function
>>
>> template <std::size_t Dimension, typename Geometry>
>> inline typename coordinate_type<Geometry>::type get(
>> Geometry const& geometry)
>>
>> has the following bit in its doxygen comment:
>>
>> \tparam Index index
>> - for Point: don't specify
>> - for Box: min_corner or max_corner
>> - for Segment: 0 / 1
>>
>> Is this doc out of sync or the Index is there on purpose?
>>
>
> OK, I think I find what's going on.
> The Index is documented for wrong get/set versions.
> So, the fix is just to shuffle the comments to right places.
>
>
Something like this is going on indeed, but it is actually not wrong or
shuffled but on purpose.

What is happening is that all is documented for a generic "get" function
(http://geometrylibrary.geodan.nl/group__access.html#g369b4a9519f357a05b68739fcf4ab374)
but behind the scenes it is splitted in two separate get functions, one
for points (with one template parameter: dimension), one for
boxes/segments (with two template parameters: Dimension/Index).

I'm curious if shuffling will solve it in the new approach, because
(IIRC) Doxygen was not too happy with this construction of two overloads
with different template parameters.

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20100308/d04903fe/attachment.html


Geometry list run by mateusz at loskot.net