On 6 Jan., 16:42, kfj <_...@
yahoo.com> wrote:
> Regardless of that, I feel that my experiments with SWIG so far are
> very encouraging - it took me less than a day to piece together a
> working prototype without any previous knowledge of the tool. The
> promise is great:
> It can generate interfaces for many different scripting languages, so
> I could have my python interface, but if someone else wanted one for
> LISP or Ruby or whatever, they should be able to get it quite easily.
> Also, SWIG seems to function with Linux, MacOS and Windows.
Okay, the CP issue was sorted out in a parallel thread, and I
continued work on the scripting interface prototype. Today I have
managed to pull two headers into it unmodified:
panodata/Panorama.h and panodata/ControlPoint.h
This means that all object types defined at these headers' base level
(so, class Panorama and class ControlPoint) became accessible as
scripting language objects - with data members and methods, all nicely
wrapped in proxy objects in - in my case - Python.
This makes me optimistic that the others will also yield eventually
and the whole panorama infrastructure will become available to the
scripting interface. Of course the mere wrapping of the headers isn't
the whole story, but it means that only some glue code will become
necessary:
- to interface where argument type conflicts arise
- to add or take away capabilites
this is a great relief, because it means also that most likely the
interface will just happily digest any changes to the headers and all
that's needed is a recompile. And it removes manual editing as a
source of error.
I also managed to write the relevant section in CMakeList.txt to
automatically compile the shared library to be loaded by the scripting
language. Theoretically (so the SWIG docu says) this should churn out
the equivalent objects on Windows and Mac as well, which would be
almost too nice to believe...
I'll keep on putting stuff into the interface that I think might be
immediately useful. When I have a nice set together, I'll tinker a bit
and see if it works, and maybe write some glue code. If all seems well
I'll publish.
Kay