Re: [pygccxml-development] Forcing shared_ptr registration
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2009-10-28 20:41:16
|
On Wed, Oct 28, 2009 at 4:21 PM, Berserker <ber...@ho...> wrote: > In my previous message I forgot this question: is it possibile to "force" > the registration of shared_ptr in a class? I mean something like: > ::boost::python::register_ptr_to_python< boost::shared_ptr<::MyClass>>(); Basically, Py++ should find out by itself, that you use shared_ptr and generate the needed code. If it doesn't work for you, it could be nice, if you could submit the example. I will be glad to fix it. Meanwhile, I can propose you work around: http://language-binding.net/pyplusplus/documentation/inserting_code.html#insert-code-to-class Another thing, you can try to play with class_t.held_type. HTH -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |