Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-07-10 03:46:18


--- In boost_at_y..., Bernhard Glück <gluber_at_g...> wrote:
> I have a little problem with the boost::python lib.

This problem might be bigger than little.

> class_builder<Object> * ScriptEngine()->GetObjectBase();
>
> module_builder * ScriptEngine()->GetModule()
>
> So in a plugin the code could write this:
>
> class_builder<MyPluginClassDerivedfromObject>
> mp(*ScriptEgine()->GetModule(),"mypluginclass");
> mp.declare_base(*ScriptEngine()->GetObjectBase);

Very interesting concept. So ScriptEngine is your C++ object?
How does GetModule() know what pointer to return?

> I came across the section in the manual about "Cross Module
dependencies"
> and tried to export_convertors_noncopyable(object_class); etc and
the
> corresponding import_convertors in the plugin modules. I think that
should
> be the solution for my problem.. But now i always get one unresolved
> external which I cannot fix... Maybe it rings a bell to anyone of
you :

declare_base() is not covered by the cross-module support.
You are not the first one to ask, so we should probably mention
this in the documentation.
I figure it is not impossible to extend the cross-module support
to do what you want, but we need a highly skilled volunteer to do
it...

But, before doing anyting else, please explain in more detail how
GetModule() knows what pointer to return! Your idea looks
intriguing.

Ralf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk