[Qgis-developer] Re: Scripting QGIS from the outside using Python
Marco Hugentobler
marco.hugentobler at sourcepole.ch
Tue Mar 20 11:47:19 EDT 2012
Hi Martin
>Usually there are only few things that need to be sorted out in SIP
>files, typically:
>- input/output parameter annotations: In, Out
>- ownership transfer annotations: Transfer, TransferBack,
TransferThis, Factory
Ideally, it works like that. However I recall that often there are
additional things to consider:
- write conversion code for template classes
- convert to subclass
- problems if you include a class that somehow indirectly includes a
header of a dependency (gdal, geos, gps)
But ok, even if it is easier for the code author to resolve that. There
is still the fact that in an opensource project people work what they
are interested in (or what they need for their job). So telling other
people to do something they don't need is usually not a success.
Regards,
Marco
On 20.03.2012 14:28, Martin Dobias wrote:
> On Tue, Mar 20, 2012 at 10:03 AM, Marco Hugentobler
> <marco.hugentobler at sourcepole.ch> wrote:
>> Hi Stefan
>>
>>
>>> Yes and no. As you know, we have tried to do so and found that it's
>>> very difficult for somebody other than the code author to add those
>>> files.
>> It is not easier for the C++ code author to create the bindings than for
>> others.
> Marco, I would disagree here.
>
> Usually there are only few things that need to be sorted out in SIP
> files, typically:
> - input/output parameter annotations: In, Out
> - ownership transfer annotations: Transfer, TransferBack, TransferThis, Factory
> The c++ author knows the semantics - someone who just wants to use
> that code does not. Ideally these things should be clear from doxygen
> documentation. However sometimes the header is not that well
> documented, so the person adding SIP files would need to look into the
> code.
>
> Anyway I do not expect from developers to make use of some advanced
> SIP annotations that require writing some code with python/sip api.
>
> Regards
> Martin
--
Dr. Marco Hugentobler
Sourcepole - Linux& Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
More information about the Qgis-developer
mailing list