[pygccxml-development] FT - transformer changes
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-09 06:18:45
|
Hi. I would like to introduce next changes to the FT classes. 1. rename function_transformer_t to transformer_t and add new class function_transformation_t Consider next example: struct vector3{ vector3( int, int, int ){...} } draw_dot( vector3 ){ ... } User can expose this function as is, but will be able also define convenience method that takes tuple. draw_dot( tuple ){ internally constructs vector3 from tuple and calls the original function. } function_transformation_t will keep list of all transformers that should be applied to the function decl_wrappers.member_function_t will keep a list of all function_transformation_t Obviously the user code, creator_t classes will have to change, but I think this is a good reason. 2. rename arg_policies.py file to transformers.py Get rid of old name 3. every transformer class should derive from transformer_t 1. This will introduce "transformer" concept to the Py++. Very, very important. 2. This will allow us to get rid of code src = map(lambda cb: getattr(cb, "wrapper_pre_call", defmeth)(self), transformers) 4. every method defined in transformer_t class should return empty string and not None. It will make it clear for user that every redefined method in the derived class should return string Matthoas what do you think? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |