Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-07-10 20:31:11

> ScriptEngine itself is a singleton so its globally accessible and
> it's DLL exported it can be accessed in all Plugins without
> (the same for my GraphicsEngine,SoundEngine,InputManager etc

The Boost.Python cross-module support uses a different technique. I
rely on Python to do the dynamic loading via the detour through a
PyCObject (I will explain if there is an interest). My motivation was
platform independence: if Python's regular import statement works, the
cross-module support will work, too. A downside is that it is
relatively cumbersome to export arbitrary objects that way.

I am still intrigued by your idea of exporting a module_builder*. This
could also be done in a platform independent way via a PyCObject. I am
wondering if this could open another avenue for implementing the
missing cross-module support for declare_base. Have to think about
for a while...

> Is it possible to overcome the missing feature of crossmodule
> support by exporting my base class in every plugin ? Would this
have some
> drawbacks ( except the memory consumption of course) If yes i could
> this in a function and just call it during plugin initialization
every time
> so the client programmer wouldn't even notice .. And yes I have
only ONE
> base class ... so this would be it...

I am not sure. Under certain circumstances you might get lucky. But I
think there is a fundamental problem: an instance (PyObject) of your
wrapped class generated in module A cannot be used as an argument to a
function in module B. If the instances are only passed back to the
module where they were created, your idea might work. But I have not
tested this, so this is pure speculation.


Boost list run by bdawes at, gregod at, cpdaniel at, john at