1

I'm working on a Java project and am looking for a library that creates C++ source code, much like Java Code Model (discussed here: A Java API to generate Java source files).

Community
  • 1
  • 1
MilkJug
  • 203
  • 3
  • 10
  • The underlying concept I believe is to populate a metamodel for the language in question and emit code (stringtemplate used by ANTLR for eg). With C++, good luck finding a metamodel that can handle the vast number of implementation quirks. On second thoughts QVT (model transformation) tries to work on similar lines and Eclipse EMF is EMOF compliant, so in theory damn it! – questzen Feb 10 '10 at 14:56
  • using a language translator like gcj or java2c is not an option? – fasseg Feb 10 '10 at 20:44

1 Answers1

0

I answered a similar question, but for Java code. The generation technology is language neutral, but your success will depend on how much of your design you can encode in the templates (as in the Java example). I think the other approach in which you try to code your entire app in the model and then have all your code generated for you will never be more than a fantasy, however.

Community
  • 1
  • 1
Chris Gerken
  • 16,221
  • 6
  • 44
  • 59