Boost logo

Geometry :

Subject: [ggl] Problem intersecting linestring & polygon in Xcode 3.2.2
From: Barend Gehrels (barend.gehrels)
Date: 2010-04-26 12:53:07


Hi Bruno,

Bruno Lalande wrote:
> Hi Barend,
>
>
>> I have checked this in the meantime. It is sometimes useful to have this
>> policy as non-const, because it changes its internal state and returns
>> immediately. For example, to check if two linestrings are disjoint, not all
>> turns (intersections) have to be checked: at the first intersection it is
>> known as disjoint. So it sets that state and returns.
>>
>
> Is it the policy that decides to change its state within a function
> that's fundamentally not a modifier? Or is the client code
> (get_turns()) modifying the policy on purpose? If the former, it's
> typically a case where the object should be const and the attribute(s)
> changed declared mutable, since the change is internal and is the
> entire decision of the policy class itself. Makes sense?
>
>
>
Sure makes sense. I doubted about that as well. Actually there are
currently two policies, one doing nothing, one changing its internal
"changed" bit and returning. Yes, it might be mutable, it is that policy
deciding to change.

Thanks, Barend
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20100426/e4bff763/attachment.html


Geometry list run by mateusz at loskot.net