[C++-sig] Extending classes

2012-12-07 Thread Charly Bicker
Dear all, currently, I am revisiting an problem I had with my project some time ago: due to several external constraints, I need to do some work if certain member functions of my classes are called from python. Initially, I put the additional code in the wrappers which were exposed with boost::

Re: [C++-sig] Extending classes

2012-12-07 Thread Holger Brandsmeier
Dear Karl, I have one idea that may help you. Say you have a class `MyClass` with a method `func` where you want extra code to be excecuted when that function is called from python. I would add a function `MyClass_func` which is a function outside a class that has the same return code as `func` a

Re: [C++-sig] Extending classes

2012-12-07 Thread Charly Bicker
Dear Holger, that sounds like it could solve most of my problems! Thank you very much! I will try to implement it over the next few days. Best regards, Karl - Original Message - From: "Holger Brandsmeier" To: "Development of Python/C++ integration" Sent: Friday, December 7, 2012 2:30: