[C++-sig] problems downcasting intrusive_ptr.
Roman Yakovenko
roman.yakovenko at gmail.com
Tue Feb 13 10:02:58 CET 2007
On 2/13/07, Lucio Moser <lucio at image-engine.com> wrote:
> Thanks a lot Roman! It solved the problem.
Please post your solution. Thus it will be available to other people too.
> Now I face another one. If I derive a python class "Derived2" from the
> "Derived" C++ class and send to "upcast" function below then I receive a
> Derive object and not Derive2. I imagined that if I created an
> intrusive_ptr version for shared_ptr_arg_to_python it would solve the
> problem. But it didn't. Do you have another tip on how to downcast for
> python-derived classes too?
I don't completely understand you. You have class defined in C++ and another one
defined in Python, derived from the first one, right? Now you want to
downcast to
the class defined in Python? If so you cannot do this. You can get
reference to relevant Python object and than using Boost.Python to get
access to desired
functionality.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list