Boost logo

Boost :

From: tom-list_at_[hidden]
Date: 2001-03-31 17:20:56

I'm using VC6 SP4 on Win2K SP1, with Boost 1.21.1 & Python 2.0.

I want to create a 'BPL extension instance' object from an existing
C++ object.

Let me start with a conventional use of the BPL that leads to my

My extension module creates a BPL extension class based on a C++
class (call it CB).

The user instantiates it ...
>>> B = CB();

Now BPL code instantiates the associated C++ class and ties it to the
new BPL extension instance object. Correct?

To get to my problem, let's say that the C++ class CB contains
another class CBa. Then CBa will automatically get instantiated when
the BPL code instantiates CB.

The CBa class, by the way, is wrapped, so there is an associated
Python (BPL extension instance) type, but since CBa got instantiated
from C++, there is no associated Python object.

I want to provide Python access to the existing C++ instance of CBa,
and I don't know how. I'm going to start looking around in the BPL
source code in the hopes of figuring out how to do this, but if
anyone knows offhand that it is or isn't possible, please let me know.


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