Author Topic: Ingesting Ada and generating C++  (Read 2141 times)

NTG

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Ingesting Ada and generating C++
« on: February 24, 2023, 01:36:39 am »
I have a legacy Ada system that I have reverse engineered into EA, so I have basic Class diagrams.  Is it possible to get EA to generate code in a language other than Ada - like C++ or Java.  Just using Generate directly and switching the language to C++ , EA barfs trying to write out the original xx.ads file.  So in short, I am looking for an Ada to C++ converter, is EA capable of doing that.

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Ingesting Ada and generating C++
« Reply #1 on: February 24, 2023, 02:27:22 am »
What would you expect? The Code? No. You can get the headers. That's it. So, since you anyway have to do it manually, start from square 1.

q.

Takeshi K

  • EA User
  • **
  • Posts: 571
  • Karma: +35/-1
    • View Profile
Re: Ingesting Ada and generating C++
« Reply #2 on: February 24, 2023, 10:33:49 am »
Hello NTG,

The path to export/import for a Class can be modified through the Properties dialog. You can also update (replace) all the paths under a Package via the generation source files feature for a Package.

But I do not know if the result (i.e. generated C++ source files  from the Ada codes) is useful.

HTH,
--
t-kouno

NTG

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Ingesting Ada and generating C++
« Reply #3 on: February 28, 2023, 06:57:36 am »
Thanks for the responses. Certainly lets me know that it is not an "automatic" feature.

jfzouain

  • EA User
  • **
  • Posts: 151
  • Karma: +6/-1
    • View Profile
Re: Ingesting Ada and generating C++
« Reply #4 on: February 28, 2023, 07:26:42 am »
Hi NTG


Like qwerty and Takeshi is saying No, it will only generate the code for the Class from the Class Diagram.

You can also go the way Takeshi is telling you.

How I have done it, is after you have the code output from the diagram.

Go to the class and under the property of the class there is way to insert the code from the ADA class into the new C++ class, and make it a note (example "//")
That will compile in C++, now go to class and translate the ADA code to C++ code

Happy coding
Best regards

Jose Zouain