And so says Peter Amstutz on 09/02/06 05:31...
> On Wed, 8 Feb 2006, Lalo Martins wrote:
> 
>>> The SWIG bindigns are a wrapper for the whole API.  AFAICS, there is no
>>> way to take an existing Vobject from C++, turn it into a Python object,
>>> and send it as an argument to a Python function.  SWIG simply doesn't do
>>> this.  I may be wrong, but I couldn't find a way.  Rather, the python
> 
> 
> Um?  Unless I misunderstand what you want, this is exactly the purpose
> of SWIG's C++ support.  See the discussion of proxy classes:
> http://www.swig.org/Doc1.3/Python.html#Python_nn28

Then I think you misunderstood; a proxy class wraps an existing class,
I'm talking about wrapping an existing instance.  After reading the
whole text of the chapter above, I:

- still don't see how to do that
- believe even more strongly that swig is not meant for what I'm doing
- believe even more strongly that complete, 1:1 wrapping as done by swig
is a very poor way to bridge between languages :-)

> Have you looked at the python programs using the existing SWIG bindngs,
> in vos/swig/tutorials?

I have; since they are in Python, they are unrelated to what I'm doing here.

===============

Another way to try to explain what I mean is by using the terminology of
"world" as used by the guile manual.  It talks about an application in
the scheme world, which calls functions defined in C, as opposed to an
application in the C world, which calls back into Scheme code (typically
scripts).

Swig helps with the former; it *may* help with the latter, but I can't
find how from the documentation.

Even if I could, I'd rather maintain this separate set of (higher-level)
bindings, than give these scripts the full power of the VOS api; it's
less trouble in the long term.  I don't want these scripts to be able to
easily create a site, set ACLs, load/unload site extensions, for
example.  All they're supposed to do is traverse the object hierarchy
and communicate trough messages.

best,
                                               Lalo Martins
--
      So many of our dreams at first seem impossible,
       then they seem improbable, and then, when we
       summon the will, they soon become inevitable.
--
personal:                              http://www.laranja.org/
technical:                    http://lalo.revisioncontrol.net/
GNU: never give up freedom                 http://www.gnu.org/


_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to