On 21 Jan., 11:39, kfj <_...@yahoo.com> wrote:

> ... I'll generate the required i-file code (so, code for SWIG) by means of
> a Python script....

... hmmm ... that didn't work out either. So I've now settled on the
following aproach (which works but isn't very elegant):

- I've taken the section in SrcPanoImage.h which defines the accessors
and the protected members by means of macro expansions and saved it as
hsi_SrcPanoImage_accessor_macros.h
- I've preprocessed this section separately:  gcc -E
hsi_SrcPanoImage_accessor_macros.h > xx
- I've copied SrcPanoImage.h to hsi_SrcPanoImage.h and replaced the
macro section with the preprocessed data in xx
- now in hsi.i, I %include this modified header

At least the process is easily repeatable and might even be automated.
With this modification now all the accessor functions are wrapped in
Python's SrcPanoImage type. I haven't checked if all returns from
these functions actually produced wrapped types as well, but the
samples I've tried worked fine.

I've modified Thomas' CMakeList.txt code to generate swigpyrun.h in
the source tree instead of the target tree, but I still haven't
figured out how to have it made automatically initially - I can get
only get it to be created if I explicitly call make 'hsi_header'.

I'll put a patch online today or tomorrow and post when I've done so.

Kay

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to