Re: [pygccxml-development] pypp_api review
Brought to you by:
mbaas,
roman_yakovenko
From: Allen B. <al...@vr...> - 2006-03-06 13:40:26
|
The current interface is not polished yet and doesn't even work. I really need answers to the questions posed in the message titled "Updated status" from 03/04/2006 07:03 PM on this list. Please take a look at that message so we can start discussing it. Roman Yakovenko wrote: >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. > > I will need to look at this again. I think I had a slight modification, but I will check. >2. I could be wrong, but pyplusplus has now all functionality provided by > DeclWrapper and MultiDeclWrapper. May be they should be removed? > > It was never really my intention to remove these since the idea is that DeclWrapper will add an easy to use user-level API for interfacing with the decls. (ie. users are not required to use the internal APIs or understand anything about pyplusplus) There are still several things in the interface that I can't do with the pyplusplus wrappers (if I could get access to them). (see message above) >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. > > I will check into this. If they are the same I would say I like the name iterdecls better at least because it sounds more like something that would iterate over a tree of decls. __make_flatten_generator sounds more like something that creates a new list. >4. I created 2 new printers: decl_printer_t in pygccxml/declarations package > and decl_wrapper_printer_t in pyplusplus/decl_wrappers, that derives from > decl_printer_t. As a bonus, decl_wrapper_printer_t prints all >relevant properties from > declaration wrappper classes. > > Does one of these have the modifications that I had in the helper printer in the pyppapi? I had modified that printer to print less a less verbose tree in a way that I think would be of help to users trying to wrap an API. >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 = module_builder_t( module_name, files, [optional] parser configuration ) > mb.parser_configuration.defines.append( ... ) > mb.code_generator_configuration.license = ... > > This way we could remove some code from module_builder. Interface >and code will > gain readability. > >What do you think? > > I need to look into this once I can get the code working again. We also need to make a list of all the things that we would want to be able to configure and set. This would help us to understand how it may be best presented to a user. When you refer to module_builder are you talking about some new class you have added in pyplusplus? -Allen >-- >Roman Yakovenko >C++ Python language binding >http://www.language-binding.net/ > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 >_______________________________________________ >pygccxml-development mailing list >pyg...@li... >https://lists.sourceforge.net/lists/listinfo/pygccxml-development > > > |