[geos-devel] Re: gettimeofday for win32

Frank Warmerdam fwarmerdam at gmail.com
Fri Dec 3 13:32:18 EST 2004

On Fri, 3 Dec 2004 17:44:35 +0100, strk at refractions.net
<strk at refractions.net> wrote:
> Well.. my idea was to have read-only or read-write access to internal
> storage, but this is really no
> > > >  t applicable since the interface states
> that the returned vector is not guaranteed to be the internal
> representation of the sequence.
> Unfortunately we cannot also give non const result as for our specific
> DefaultCoordinateSequence case the returned vector is actually the
> internal representation, and messing w/ it would modify the object.


Whether DefaultCoordinateSequence is returning the internal
representation or not, the method was returning the result
without a const attribute before I ever touched it as far as I 
know.  I think this area needs further consideration.    

Basically, if you are willing to force any derived type to 
manage copies internally, you could *just* have the const
return type, and it would be up to the object to manage 
generated copies of the coordinates internally, cleaning them
up when the object is destroyed (or modified?). 

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the geos-devel mailing list