Re: [C++-sig] Extending classes

2012-12-07 Thread Charly Bicker
ecember 7, 2012 2:30:16 PM Subject: Re: [C++-sig] Extending classes 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

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

[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::