>Hrmm.. I've written an Object Pascal template/macro processor which we use
>here at Profax.

Is there a hook in Delphi to get your preprocessor automatically called prior
to compiling any *.pas file?

> I have considered offering the processor as a public domain
>utility and 'donating' the executable to the Delphi community since
>Templates are pretty damn handy for efficient type-safe containers and are
>the one thing I actually miss from C++.


I miss it... It basically gives you a very simple subclassing engine so you
don't have to compromise on Typesafety...

>The Template Processor is a Delphi executable which reads a template
>specification unit (.nlt) and prompts for the paramater values and an output
>unit name (.pas) which it then produces. The processor is a single pass
>lexer/tokenizer/macro processor engine working largely upon memory streams
>so it seems pretty quick. It actually depends upon itself now since the code
>now uses a uDList<string> template  internally rather than TStringLists
>which gave a nice order of magnitude speed improvement for inserts and
>deletes which macro engines by their nature do quite a bit off.
>If anyone is interested, I can email them the .EXE and the complete
>uDList.nlt as a sample. If lots of people end up asking, I'll put it up on
>the 'NewLook Free Stuff' page at http://www.newlook.co.nz/freestuff.htm
>instead.


Definitely interested... Have you posted it and suggestions for inclusion in
D5... Seems that the preprocessor functions are the only big thing missing
in Delphi (apart from fixing the degrading quality of online help)...

It'd be nice to see a few other features available on some C compilers too...
like compiletime defined constants for current_source_line, current_source_file
compilation_datestamp, Method_Name, ... I'll pass on the #defines though,
that got pretty messy in C... ;)

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to