logo       

Dynamic casting in C++ of the "this" attribute in a python class that wraps: msg#00070

programming.swig

Subject: Dynamic casting in C++ of the "this" attribute in a python class that wraps a C++ class

yakumoklesk@xxxxxxxx writes:
> I am trying to embed python in my C++ application. I have created some
> DLLs of some classes. Then in python scripts I use the wrapped
> classes. Those scripts are executed in C++ using the embedded python
> interpreter. Once executed, python wrapped classes are created. Then I
> can acces to those classes through the Python C/API. When I have de
> PyObject of one of those wrapped class, then I want to make a dynamic
> cast of the this pointer, but I don't know how to access to
> SWIG_ConvertPtr from my C++ code, or how to code a function in a
> swig .i interface to do so.
>

Look at the SWIG CHANGES file from date 03/18/2002 for information
about how to do dynamic casting of C++ objects in SWIG .i files.

Cheers,
Dave

_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise