[pygccxml-development] Adding code creators to decl_wrappers...
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-03-16 15:39:19
|
Hi, the last "high priority" thing (at least for me) that I was missing was the ability to add code creators to declarations, so I gave it a try myself and modified pyplusplus. Here is what I did: - In decl_wrappers.scopedef_t I added a method "append_creator()" that adds a code creator to an internal list (which is made available as a read-only property). - In code_creators.scoped_t I re-implemented the create() method so that it first adds the creators from the declaration to the local list of creators and then it calls the inherited create() method. I did that here and not in the constructor because I thought it's better to add the custom code creators to the *end* of the list instead of the beginning. Roman, is that along the lines as you were thinking to implement it yourself? (should append_creator() rather be called adopt_creator() as they are already called in the code creators?) If you have no objections against the above approach I can commit the changes. - Matthias - |