-
September 7th, 2009, 03:34 PM
#1
Alternative C++ Preprocessing
Hey there,
What I'm trying to do is make declaring objects for a script virtual machine transparent, and the system I had before was a combination of the C Preprocessor and CPP templates which created static objects that were then executed and added to the VM upon runtime -- that is needlessly inefficient though, and not terribly transparent.
What I -want- is to find a preprocessor that will parse my code, and when it finds a class/function/method/variable/member that has the pseudomodifier 'SCRIPT' behind it (#define SCRIPT) will add it to a source file so it can be included in the build later.
As far as I know, the C preprocessor could not possibly handle this, and I don't want to have to write a Python script to parse C++ simply to accomplish this task, so I was wondering if there were a simpler method by which to accomplish such...
Thank you!
Mike
-
September 7th, 2009, 04:54 PM
#2
Re: Alternative C++ Preprocessing
Systems like that certainly exist. Qt for example has its own preprocessor called MOC (Meta-Object Compiler) which translates some custom Qt code into standard C++. I don't know though if there are any available that are really meant to be customizable for your own uses.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|