[geos-devel] 3.2.0 Final

Barend Gehrels Barend.Gehrels at geodan.nl
Sat Dec 12 06:47:47 EST 2009


> The C Api wraps a small portion of the C++ API.
> The thing is that in C++ there are *a lot* of interfaces
> exposed which should not be.
>
> You might have noticed that many of the headers were not
> installed up to 3.1.x. This was an attempt to reduce the
> set of exposed interface.
>
> Remember that GEOS is a direct port of JTS, where (in Java)
> there are visibility levels that are not supported in C++
> (default visibility == only classes in same package can use
> those interfaces). In GEOS those all became public instead.
>   
Thanks, this explanation is much more clear than the "prefer troubles" 
statement. I think Frank's suggested wording is perfect.

On the friend discussion: you can probably put those not-to-be-exposed 
interfaces in a namespace like "detail", or "impl", or "not_exposed". 
That will prevent normal C++ programmers from using it, without the 
drawbacks of friends. The interfaces are technically not hidden then, 
but it is clear they are not recommended.

Regards, Barend





More information about the geos-devel mailing list