[pygccxml-development] pypp_api review
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-03-06 05:37:06
|
Hi. I did small review to pypp_api. 1. cleanTemplateName this function already exists: decl_wrapper/algorithm.py - create_valid_name. I think you can use it. 2. I could be wrong, but pyplusplus has now all functionality provided by DeclWrapper and MultiDeclWrapper. May be they should be removed? 3. iterdecls - this functionality already exists. Please see pygccxml/declarations/algorithm.py function __make_flatten_generator. It has all functionality provided by iterdecls. Also I did not use it because of performance, it is slowly then creating a list and then iterating over = it. But I could be wrong. 4. I created 2 new printers: decl_printer_t in pygccxml/declarations packag= e and decl_wrapper_printer_t in pyplusplus/decl_wrappers, that derives fr= om decl_printer_t. As a bonus, decl_wrapper_printer_t prints all relevant properties from declaration wrappper classes. 5. I think that ModuleBuilder interface is a little bit messy. There are so many properties and functions. Some configuration is done using properties, other using function arguments. I am not saying that this is wrong, but rather confusing. Also I did not get the guide-line when and what approach to use. I think it would be much better to have 2 configuration properties on module builder 1. parser_configuration 2. code_generator_configuration Then could would look like this: mb =3D module_builder_t( module_name, files, [optional] parser configura= tion ) mb.parser_configuration.defines.append( ... ) mb.code_generator_configuration.license =3D ... This way we could remove some code from module_builder. Interface and code will gain readability. What do you think? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |