[pygccxml-development] FT - recent changes
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-24 21:15:40
|
Hi. I committed few small changes to FT feature. The main one is the interface change: Now in order to add new transformation user have to write: f.add_transformation( output(1), output(2) ) f.transformations property provides access to all function transformations that should be applied. The change was necessary because I want the way to apply few function transformations on a single function. For example: struct error_t{}; void do_smth( ..., error_t& ); I want to expose do_smth in 2 ways: 1. as is: def( "do_smth_no_raise", &do_smth ); 2. error status is converted by Py++ to exception: void do_smth_raise(){ error_t x; do_smth( x ); if x contains error: throw actual error; } def( "do_smth", &do_smth_raise ); do_smth.add_transformation() #<- use Py++ default behaviour do_smth.add_transformation( raise_on_error( 0, ... ) ) -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |