inlining via external text processing (Real Studio network user group Mailinglist archive)
|FW: Special Valentine's Offer for Valentina - Beat the Price Increase! - Lynn Fredricks|
|inlining via external text processing - Andy Dent|
|inlining via external text processing|
|Date: 25.11.07 05:08 (Sun, 25 Nov 2007 13:08:53 +0900)|
|From: Andy Dent|
How's this for an idea?
1) functions to be inlined are named with a word you determine by
convention, such that a regex pattern match can be written against the
2) a text processor goes through your code and for every point they
are called, copies the function body in to replace that call, inside a
pair of bounding comments or #if, like
3) a reverse-inlining text processor can undo the changes from 2) to
take your code back to an "out of line" approach
4) as an added option, the generated code could be to a new source file.
This yields a solution which allows:
i) easy debugging of the code generated by inlining (often a pain)
ii) safety - code generation is reversible or transforms only to
generate new files, leaving your original untouched.
iii) something that can be implemented independent of RS.
Andy Dent BSc MACS http://www.oofile.com.au/
OOFILE - Database, Reports, Graphs, GUI for c++ on multiple platforms
REALbasic, C++, Python, Mac and Windows development and porting
Unsubscribe or switch delivery mode:
Search the archives: