Book a Demo

Author Topic: Reverse and forward engineering concerns  (Read 6985 times)

Levent Mollamustafaoglu

  • Guest
Reverse and forward engineering concerns
« on: March 18, 2002, 09:07:28 am »
As a prospective customer, I am trying out various aspects of EA and have some concerns about the forward and reverse engineering. I use C++.

When I reverse-engineer a library that is already implemented, the default values for the method parameters are taken from the .cpp file. However, Visual C++ does not allow you to put any default values in the function header in the .cpp file, so it takes all string attributes to have a default value of <none>. However, the original default value was in the .h file, which it missed. This seems to work for non-string parameters.

All notes entered for methods or the class itself are put into the .cpp file. When reverse-engineering, it does not take any comments it finds in the .h file. Remember that Visual C++ encourages the use of comments in the .h file so that when coding you can already see some of these comments as pop-up help when you pass over a method in the editor.

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Reverse and forward engineering concerns
« Reply #1 on: March 18, 2002, 02:04:23 pm »
Hi Levent,

I was not aware of the problem with string default values - I will look into it this week.

With regard to picking up method comments from the .cpp file, it was felt that it was general practice to place most comments directly above the implementation - rather than in the header file. As you point out, developers are being encouraged to add comments to the .h file, so maybe a Local Setting could be added to read/write method comments from the .h file or from the .cpp file for C++. Let me know if this would suit. Merging comments from both sources and updating both correctly would be a little more involved.

Geoff Sparks



Levent Mollamustafaoglu

  • Guest
Re: Reverse and forward engineering concerns
« Reply #2 on: March 18, 2002, 05:42:17 pm »
I think a setting to choose between the .h and .cpp will do.

Fugazy

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • YoMan
    • View Profile
Re: Reverse and forward engineering concerns
« Reply #3 on: March 19, 2002, 04:28:05 am »
another concern is the extension for implementation because it assumes .cpp
we are using .cxx instead. could there be a way of choosing the implementation extension or give a list of possible ones.
Another pb is that .h and .cpp are not in the same directories, all .h are in common place, .cpp are splited across 'packages'

BooBoo

  • Guest
Re: Reverse and forward engineering concerns
« Reply #4 on: March 21, 2002, 02:19:00 pm »
Hi Fugazy,
Yes, you can change the extension. When you generate a class, before clicking on the Generate button there is Advantage button right next to it. Click on it and then select C++ Specifications which will allow you to change the default value.  :D

Fugazy

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • YoMan
    • View Profile
Re: Reverse and forward engineering concerns
« Reply #5 on: March 21, 2002, 02:53:03 pm »
Sory i can read i was not clear enough in my post. I was speaking about reverse engeniering not code creation. i could not find a way to tell EA that the implementation files are with a .cxx extension instead of .cpp

molla

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: Reverse and forward engineering concerns
« Reply #6 on: March 25, 2002, 03:32:21 pm »
Thanks for the really quick reply and the fixes for these. However, I still see some problem :

1) When reverse engineering, it still does not take the empty string default values from the .h file. Now it seems to work when forward engineering, namely it puts the default values - correctly - to the header and comments to the .cpp.
2) When the declaration of the method in the .h file is spread out into several lines and parameters are separated by // comment lines in between, the parser seems to miss some of the parameters and puts a name that it takes from the comment. It works when all parameter lines are consecutive.

Quote
Hi Levent,

I was not aware of the problem with string default values - I will look into it this week.

With regard to picking up method comments from the .cpp file, it was felt that it was general practice to place most comments directly above the implementation - rather than in the header file. As you point out, developers are being encouraged to add comments to the .h file, so maybe a Local Setting could be added to read/write method comments from the .h file or from the .cpp file for C++. Let me know if this would suit. Merging comments from both sources and updating both correctly would be a little more involved.

Geoff Sparks