TextGen and generating multiple output files in Java and C++ text

Hello Fellow MetaProgrammerS.

Is it possible to generate multiple files from a single concept instance?

I'm working on a data schema language for my company.
The goal is to generate, from a single DSL, parsing implementation and classes in multiple languages. We generate java already successfully.
Next step is C++ (then Objective C, JavaScript, Ruby).
I decided to go directly through TextGen to C++ text for now.
I've added "text gen component for concept Protein".
At first it didn't do any generation.
So I thought that maybe my Java generator is intercepting it.
So I deleted root mapping rule in generator.
This resulted in the textgen component actually being triggered – good.

Now my question is how do I allow both the textgen-to-C++ and the to-java generator to work side-by-side?
That is a requirement for our stuff to really work for our cross-platform projects.

If it is not possible now, I could probably create a patch to enable that - please advise (how difficult would that be and where to start).

Another question is, how do configure file name for text-gen?
Right now it takes the concept instance name directly, but I need to do some name mangling/suffixing. I already know how to provide file extension programmatically. But what about providing a custom name?

Btw, what do you think about C++ AST/generator implementation coming from mbeddr project?
I just need simple stuff like generating C++ classes, getters. Although I might need support of calling generic methods from another lib for my parsing purposes; is it supported?

Thanks in advance for replies.

Karol Depka Pradzinski
Another thing is that when I do "Build -> Make Project", the c++ files do not actually appear in the filesystem. I was only able to get a preview using "Preview Generated Text".
How to actually get all the generated C++ files to appear in the file system?
I can just give you a suggestion for your output file name issue:
If textgen uses the root node name attribute as file base name, why don't you just modify this name during generation by a mapping script?

Please sign in to leave a comment.