Book a Demo

Author Topic: C++ code generation  (Read 4680 times)

robiwan

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
C++ code generation
« on: February 09, 2007, 02:32:12 am »
Each time I generate code, EA adds already existing operations. How is it meant to work using EA in a analysis/design/implementation phase?

Coming from Rational Rose (which is ridiculously pricy, but admittedly does work well), this behavior simply doesn't "cut it" for me. Should I file a bug report? I'd rather be told how to make it work though... :)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: C++ code generation
« Reply #1 on: February 09, 2007, 02:52:26 am »
Check the various settings on the Import and Export dialogs. I don't have them in front of me, but you'll find what you need.
No, you can't have it!

robiwan

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: C++ code generation
« Reply #2 on: February 09, 2007, 03:03:24 am »
Quote
Check the various settings on the Import and Export dialogs. I don't have them in front of me, but you'll find what you need.


Import, Export? What does that have to do with C++ code generation from a model made from scratch in EA?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: C++ code generation
« Reply #3 on: February 09, 2007, 03:14:46 am »
Sorry, I meant forward and reverse engineering. Too early in the morning here.
No, you can't have it!

robiwan

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: C++ code generation
« Reply #4 on: February 09, 2007, 11:18:48 am »
Quote
Sorry, I meant forward and reverse engineering. Too early in the morning here.


OK! And those settings are to be found where? I've gone through every menu item in EA not finding anything to do with forward/reverse engineering. All I've found is the selection under "Tools/Options/Source Code Engineering" - "Always synchronize with existing file". And that does not seem to work very well...

Sorry to be a nuisance, but I'm evaluating what UML package to buy and I've been evaluating VP and EA (of which both are in our excepted price range). The raw code generation from EA looks a lot nicer (and is configurable with templates which is a _huge_ plus), but not being able to have design/implementation iterations without it (EA) messing up the source code is a show-stopper (the operation in question is a pure-virtual C++ void operation).

You should consider setting UUIDs for each operation (as Rose does) to be able to track changes (forward/reverse) of the model. Otherwise I realize it must be hard to sync operation prototypes with whats in the model (so that the code generation doesn't unnecessarily generate an operation over and over again, even though the operation exists).

Regards,
/R

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: C++ code generation
« Reply #5 on: February 11, 2007, 01:11:11 pm »
You haven't specified what you're doing to cause the EA methods to be regenerated rather than synchronized, so I'm guessing that you're changing the method signature.

The are two options that EA has that can help you get closer to the behaviour you want.  Although EA doesn't insert GUIDS into code so it's not going to be quite what you have experienced with rose.

Tools | Options | Source Code Engineering | Attribute/Operations | On forward synch, prompt to delete code features not in model.  This will cause EA to bring up a dialog box asking for a mapping between model methods and code methods when necessary.  (See http://www.sparxsystems.com/EAUserGuide/index.html?cgo_synchcode.htm)

Project | Build and Run | Package Build Scripts | Use Live Code Generation.  This will cause EA to automatically generate any changes and in most casees prevents the need for manual intervention.  (See http://www.sparxsystems.com/EAUserGuide/index.html?sourcecodeconfiguration.htm)

bmioch

  • EA User
  • **
  • Posts: 81
  • Karma: +0/-0
    • View Profile
Re: C++ code generation
« Reply #6 on: February 11, 2007, 03:19:53 pm »
Just so you know Robiwan, this forum is a User Forum. Any critical problems you have should be directed through the appropriate support forms, available from the Support link at the top of the page, or in the Help menu of Enterprise Architect.

For trial users those forms are:
http://www.sparxsystems.com/support/bug_report.html
http://www.sparxsystems.com/support/feature_request.html

robiwan

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: C++ code generation
« Reply #7 on: February 11, 2007, 10:53:16 pm »
Quote
You haven't specified what you're doing to cause the EA methods to be regenerated rather than synchronized, so I'm guessing that you're changing the method signature.


No, I'm not changing the signature. If I just run code generation 3 times, I get 3 instances of the same operation. But I'll try out all the other tips you gave, and if it doesn't help I'll go to the bug report pages you mentioned later on, and I can send you the model.

Thanks!
Regards
/r

robiwan

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: C++ code generation
« Reply #8 on: February 12, 2007, 12:34:39 am »
Quote
But I'll try out all the other tips you gave, and if it doesn't help I'll go to the bug report pages you mentioned later on, and I can send you the model.


Ok, it seems that the tips you mentioned solved the problem.

Thanks very much! :)
/R