Re: [pygccxml-development] FT - recent changes
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-25 20:25:53
|
On 10/25/06, Matthias Baas <ba...@ir...> wrote: > Roman Yakovenko wrote: > >> > do_smth.add_transformation() #<- use Py++ default behaviour > >> > do_smth.add_transformation( raise_on_error( 0, ... ) ) > >> > >> How do you rename the first version to "do_smth_no_raise" (without > >> renaming the other one)? > > > > do_smth.add_transformation( "do_smth_no_raise", raise_on_error( 0, ... ) ) > > What about other decoration operations (such as assigning call policies, > assigning a doc string, etc.)? This is exactly function_transformation_t class for. add_transformation is just a convenience method. > Why isn't the existing interface used? The user could obtain a handle to > a "clone" of the original declaration (either returned by > add_transformation() or maybe even by a dedicated clone() method) that > provides the same interface as the regular declarations. Then the user > could do to the clone whatever he could do to every other declaration > using an interface that he knows already. In general asking a user to modify his data is a bad idea. Py++ should not change the declarations tree, but work with it as is. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |