Re: [pygccxml-development] Printing declarations...
Brought to you by:
mbaas,
roman_yakovenko
|
From: Matthias B. <ba...@ir...> - 2006-03-20 10:09:14
|
Roman Yakovenko wrote:
>> typedef double (::MVector::*bracket_op)(unsigned int i) const;
>>
>> and then rewrite the above as
>>
>> MVector_exposer.def( "__call__"
>> , (bracket_op)(&MVector::operator())
>> , ( bp::arg("i") )
>> , bp::default_call_policies() );
>>
>> then it compiles fine. Could this scheme be incorporated in pyplusplus?
>
> Yes. I need it also for template functions too. Do you think we need to
> implement this before release or after?
Whenever you have some time you can spend on it. In the above case, the
call operator is not that important, so I can wait.
> Also, untill I add this code to pyplusplus and you don't have an other
> operator ()
> on MVector you can set create_with_signature to false.
I didn't notice a difference in the generated code....?
>> Almost, the signature is there but the actual method name is missing.
>
> Okay, I give up :-). I understand what you want, but I don't
> understand the format.
The more it resembles the original source code the better. I'm dumping
the declarations into a log file that the user can inspect. For example,
he could just grep for a particular function name to find out what
decorations have been applied to that function.
> Also, why do you need this from framework. You have all tools to
> create almost any format by your own?
Well, yes, but it seems that recreating the source code doesn't look
that easy to me (and I don't know how much of the original source code
(which could be reused here) has survived in the output from gccxml).
When I have some time left I can have a look at it. Would you like the
idea to add __str__() methods to the declaration_t classes? (then a user
could just print a declaration and see exactly what it is)
- Matthias -
|