[mapserver-dev] Re: Changing the connectiontype with the mapscript interface doesn't change the vtable.

Daniel Morissette dmorissette at mapgears.com
Wed Aug 13 10:13:24 EDT 2008


Tamas,

I saw that you added this in r7845 a few minutes ago, but would have a 
few comments/questions:

1- What value should be passed to the library_str arg? That's not 
specified in the docs that you created in mapscript.txt

2- The new method is called layerObj.connectLayer() ... would it not be 
better call it layerObj.setConnectionType()? It seems to me that 
setConnectionType() would be more meaningful since it's not opening an 
actual connection contrary to what the verb "connect" suggests, and it's 
also not setting the layer->connection value, it's just setting the 
connection type params, right?

Daniel

Tamas Szekeres wrote:
> Or this way ;-)
> 
> int ConnectLayer(int connectiontype,
>                             char *library_str)
>     {
>         msConnectLayer(self, connectiontype, library_str);
>     }
> 
> 
> 
> 2008/8/12 Tamas Szekeres <szekerest at gmail.com>:
>> Hmmm. What I really want to do is to expose msConnectLayer in layer.i:
>>
>> int ConnectLayer(int connectiontype,
>>                            char *library_str)
>>    {
>>        msConnectLayer(self,
>>                   const int connectiontype,
>>                   const char *library_str)
>>    }
>>
>>
>>
>> Tamas
>>
>>
>> 2008/8/12 Tamas Szekeres <szekerest at gmail.com>:
>>> Devs,
>>>
>>> By changing the connectiontype at the SWIG interface the vtable will
>>> not change accordingly so the vtable function of the old
>>> connectiontype will be called.
>>> Do we have a method to reset the vtable in this case or should we
>>> probably implement a layerObj.setConnectionType  for this purpose?
>>>
>>>
>>> Best regards,
>>>
>>> Tamas
>>>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-dev mailing list