Book a Demo

Author Topic: Code generation concept  (Read 3882 times)

nicholas_yue

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Code generation concept
« on: September 06, 2003, 11:33:52 pm »
Hi,

 I am evaluating version 3.51 (I know there is a new version just posted) of EA.

 I am evaluating its code generation capabilities.

 For the evaluation, I am designing a scenegraph traversal package using the Visitor Pattern.

 I wish to be able to generate Java, C++ and C# code from the same design, this allows me to update a common design base.

 Pardon my ignorance but I could not locate instruction on how to actually provide the implementation detail i.e. where do I type the code (my code which is the actual implementation detail).

 I am having difficulty grasping the code generation concept in EA.

 I have use a different package which allows you to type in your implementation for the various methods in a class but I can't seems to find a way to do that with EA?

 Also, how does EA handle the situation of multiple languages.

 I have tried reading the code generation section in the manual but it did not help me in understanding the code generation concept in EA.

Thanks in advance.

Cheers
--
Nicholas Yue


AdamHearn

  • EA User
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
Re: Code generation concept
« Reply #1 on: September 09, 2003, 04:06:39 am »
I'm no expert, but here's my help!

Code that is the implementation of a method would be placed in the 'Behaviour' tab of the method element. It isn't 'great' as the code is entered in to a multi-line text box and comes out as a comment within your code (once generated).

Round trip isn't done that well either! If you add more code to the source file then synchronise the model against it, any new code added will simply be ignored.

Therefore, be careful when generating new code (not to overwrite the source file - i.e. leave option as default) as you could lose some work.

As for multiple langauges, EA doesn't support this - though I'm at a loss really why you need such a facility :)

Best of luck!

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
Re: Code generation concept
« Reply #2 on: September 09, 2003, 04:16:12 am »
EA doesn't attempt to generate, nor reverse, behaviour code. Only class definitions are generated/reversed. I do seem to recall that entering/reversing code in the behaviour tab is on the list of planned features.

Mikkel