Swig and contructor overloading...
Tamas Szekeres
szekeres.tamas at FREEMAIL.HU
Thu Nov 3 18:13:41 EST 2005
Steve,
This change breaks the compatibility with the existing interface that
causes compilation error with c# (the samples like shpdump uses the
original constructor).
However the compatibility could be maintained by keeping the original
constructor in addition to the new.
SWIG 1.3.27 can handle multiple constructors accordingly (C#)
Tamas Szekeres
On Wed, 2 Nov 2005 21:50:28 -0600, Steve Lime <steve.lime at DNR.STATE.MN.US>
wrote:
>Hi all: Frank and I added some WKT support to MapServer 4.7/8 this past
weekend. I updated the Swig interface file for the shapeObj (shape.i) and
added a second parameter to the shapeObj constructor. It now looks like:
>
> shapeObj(int type=MS_SHAPE_NULL, char *wkt=NULL)
>
>Ideally you'd be able to create a shape with one or the other. Sean tells
me this will be problematic for Java and C# based Swig modules because
they don't handle default values. This change will break scripts then.
Does anyone know if this is still true in the newest version of Swig? I
know they did some work to standardize things across all languages
recently. If this will be problem, then we have to address it. We could
just tackle it with documentation since those bindings are not yet as
popular. We could move creation from WKT into a seperate method. Or?
>
>Note that WKT reading/writing requires either OGR or GEOS support.
>
>Steve
More information about the mapserver-dev
mailing list