[C++-sig] Pyste: support for user defined code.

Niall Douglas s_sourceforge at nedprod.com
Sun Aug 17 17:50:03 CEST 2003


On 16 Aug 2003 at 16:51, Nicodemus wrote:

> add_include('header1', 'header2', 'header3')
> add_code(MODULE, <code>)
> add_code(DECLARATION, <code>)
> add_code(GLOBAL_DECLARATION, <code>)  # outside the namespace
> generated by pyste.
>                                    # Any suggestions for a better
>                                    name?
> 
> Does it cover all the needs, or am I missing something? 8)
> 
> I plan to work on this tomorrow, or perhaps a little today. Any 
> suggestions are appreciated!!

This seems to me to add complexity where you don't need it. You 
should have an "Include()" directive which lets you place includes 
before at the top, after that, module definitions etc.

Then you place all the relevent code you want to insert into .cpp 
files which are then #include'd by the Include() in the right place.

This makes keeping bits separate and maintainable much easier. It's 
what I use myself here using a python script to postprocess the pyste 
output.

Cheers,
Niall





More information about the Cplusplus-sig mailing list