[geos-devel] GeometryFactory - call for explanation
strk at refractions.net
strk at refractions.net
Fri Mar 31 04:59:18 EST 2006
On Fri, Mar 31, 2006 at 03:45:25AM +0200, Mateusz £oskot wrote:
> I'd suggest to use "Shared Smart Pointer" semantic to manage geometry
> factories and their relations to geometry objects.
> One possibility is to use boost::shared_ptr (no linking to ext. libs
> required, just including one header, as <vector> or <list>).
I agree on using shared pointer, but I don't think it takes
a single header. If you want to inspect this please do, and
also remember Frank request of making it possible for
builders to choose between the GEOS-embedded version and
an external version of them (acting on the -I switch
would be enough).
> Why not to use singleton or when to use it?
>
> Singleton is another option but *does* *not* apply to the current
> design, according to assumptions already confirmed.
I might have used the wrong term, but by Singleton I meant
a "default" instance of a GeometryFactory, for use by
calls w/out an explicit provision of it.
I don't know if it's worth the trouble, when
using shared_ptr. Probably not.
--strk;
More information about the geos-devel
mailing list