[C++-sig] Dynamic resolution of members and methods

Jérémie Delaitre jeremie.delaitre at technogerma.fr
Wed Dec 17 13:21:26 CET 2008


Stefan Seefeld a écrit :
> Jérémie Delaitre wrote:
>> Ok, I have find a way to resolve all of my problem.
>> I simply declare a new custom type which is callable.
>> This way, when the user type in python 'myObj.myFunc(...)', 
>> mytype_getattro is called
>> with 'myObj' as self and 'myFunc' as arg. Then, I return a new 
>> instance of the callable type
>> which is fill with all the information I need to identify the 
>> function. Then python simply call the
>> functor.
>
> From this and your previous mail it doesn't sound as if you used any 
> boost.python for this. Any reason for that ?
>
> Regards,
>       Stefan
>
We are not using boost.python because we already have a system which 
allow us to bind members, methods, ... into a metaclass.
We just want to publish these metaclasses into Python.

As we already declare our bindings, we do not want to declare another 
one for Python. Moreover, we want to support other script engine.
Thus, we do not want to declare bindings for each but rather give to the 
script engines an access to our custom system.

Regards,

Jérémie Delaitre




More information about the Cplusplus-sig mailing list