Re: [pygccxml-development] pypp_api review
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-03-06 14:13:03
|
On 3/6/06, Allen Bierbaum <al...@vr...> wrote: > Allen Bierbaum wrote: > > > > >> 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 > >> configuration ) > >> mb.parser_configuration.defines.append( ... ) > >> mb.code_generator_configuration.license =3D ... > >> > I was thinking about this a little more and took a look at the code. As > far as I can tell all configuration is currently done by passing > parameters to the ModuleBuilder init when things get started up and then > to the writeModule() method when the user wants to finally generate the > code. I don't see anything done directly with properties. Am I missing > something here? I think yes. In order to set licence you need to modify mLicense. Also why __init__ takes parsing configuration and not parse function ( I think I know the answer, but still ) I think that in __init__, parse or writeModule we should only ask for parameters we can deal without them. All other should be set using properti= es. > Are you just saying that you would like to see the internal properties > grouped into two namespaces so they are separated for users? (that > looks to be what the interface example above would do) Yes, I fill that this is a little better way - you say to user what property configure what. ( I hope I said this right :-) ) Don't you think so? > -Allen -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |