Alternative C++ Preprocessing
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Alternative C++ Preprocessing

Hybrid View

  1. #1
    Join Date
    Sep 2009

    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!

  2. #2
    Join Date
    Aug 2007

    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This a survey!

On-Demand Webinars (sponsored)