[C++-sig] Inserting custom code into pyplusplus output

Niall Douglas s_sourceforge at nedprod.com
Thu Jun 15 17:46:58 CEST 2006


On 15 Jun 2006 at 8:55, Roman Yakovenko wrote:

> If you want to insert a code in some specific place, then :
> 
> module.body.adopt_creator( code_creators.custom_text_t( ... ), position )
> ( By default the code creator will be appended to the end of the list )

No, this appends into TnFOX.main.cpp. I need it appended into 
FXApp.pypp.cpp. If you examine file_writers/multiple_files.py, you 
can see it writes license, precompiled header, global headers, global 
namespace aliases, wrapper classes and the register function for the 
class in question. Nowhere is it letting you write custom text 
outside the bodies of these items. I suppose you could add a custom 
form of wrapper code creator, but this seems inflexible - you should 
be able to insert text anywhere in any output file.

Cheers,
Niall






More information about the Cplusplus-sig mailing list