[geos-devel] ABI protection (COMMIT)

strk at refractions.net strk at refractions.net
Sun Jun 26 05:42:02 EDT 2005


Committed as non-virtual addition.
Thank you all for your thoughts
--strk;

On Sat, Jun 25, 2005 at 03:54:01PM -0400, Frank Warmerdam wrote:
> On 6/25/05, strk at refractions.net <strk at refractions.net> wrote:
> > On Sat, Jun 25, 2005 at 10:21:22AM -0500, Curtis Barrett wrote:
> > > Adding non-virtual methods will not break compatibility. If the method is virtual, I don't think you can add it without breaking compatibility.
> > >
> > > One option would be to (for now) make the new method a function external to the Node class and grant it friend status with Node. This way, it can work on the interals of Node without changing Node's face to the world. Depending on what the method does, this may not be practical.
> > 
> > I think non-virtual option is ok for the 2.1 branch.
> > Other thougths ?
> 
> Strk,
> 
> I don't believe that OGR interacts directly with the Node class.
> The OGR bindings are still quite simple - the common operates on 
> geos::Geometry.  
> 
> If there are not classes derived from Node for which you need
> to retain binary compatibility then adding the method at the end
> of the class (and hence the end of the vtable) should avoid any
> ABI effects.  Otherwise having it non-virtual will avoid ABI changes,
> as suggested. 
> 
> I think making it not virtual would be preferrable as a "bridge" step 
> as opposed to using a friend function. 
> 
> 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
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list