[gme-users] Strategy for source code generation

Zoltan Molnar zolmol at isis.vanderbilt.edu
Fri Aug 11 12:01:59 CDT 2006


There is a long list of different code generators at http://www.codegeneration.net/generators-by-language.php?language=4
Some guys here have used Velocity. 
[No support provided]
 
br, Zoli
 
 

-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Nicki Lehmann Møller
Sent: Friday, August 11, 2006 3:09 AM
To: gme-users
Subject: [gme-users] Strategy for source code generation


Hi Matt


I was simply hoping that there was some simple api that I could use to generate my output without having to implement it my self. 
I imagine something like 

Iterator i = selected.iterator();
while ( i.hasNext()) {
  JBuilderObject element = (JBuilderObject) i.next();

  JavaClass jc =  SimpleAPI.CreateSource(new file(element.getName()), Java); 
  jc.addAttrib(element.getAttribute(Jadajada, whatever));
  jc.setAttrib(element.getAttribute(Jadajada), value);
  jc.addMethod(new MethodSignature(name, returnType, params))
  jc.defineMethod(name, new MethodDefinition(contentOfTheMethod));
  jc.flush(); //generate a file containing java source code 
}

As I haven't given this example too much thourght there are probably some bad design issues related to it so please don't give it too much attention. The main point is that I, with something like this, would be able to create java or c# source code without having to worry too much about the correctness of my source code output. 

regards, 
Nicki



On 8/11/06, Matthew J. Emerson <  <mailto:mjemerson at isis.vanderbilt.edu> mjemerson at isis.vanderbilt.edu> wrote: 

Can you provide some more information on exactly what you're looking for, and how you would expect it to work? If it doesn't exist, maybe it's worth building. 

--Matt


-----Original Message-----
From:   gme-users-bounces at list.isis.vanderbilt.edu  <mailto:gme-users-bounces at list.isis.vanderbilt.edu> on behalf of Adi Mallikarjuna Reddy V
Sent:   Thu 8/10/2006 11:18 PM 
To:     gme-users
Cc:
Subject:        Re: [gme-users] Strategy for source code generation

Hey Nicki,
Even I am also looking for that kind of thing. Even I have to write it from
scratch to generate code from the model. Is there any one who is working on 
the similar lines?.

Regards
Adi

On 8/11/06, Nicki Lehmann Møller <nicki at itu.dk> wrote:
>
> Hi all!
>
> After having worked a bit with the GME I'm wondering if some of you guys 
> or girls can help with the transformation of my model into source code
> (preferably C# but Java will do). I'm currently building my interpreter
> using the JAVA API (BON) and the only strategy that I know of is to build 
> the whole source code output library myself :( I was however hoping that
> some of you knew of some tool, api or strategy that could ease the source
> code generation a bit.
>
> Kind regards, 
> Nicki
>
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060811/75849f77/attachment.htm


More information about the gme-users mailing list