Book a Demo

Author Topic: Problems with reverse engineering C++  (Read 2882 times)

Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Problems with reverse engineering C++
« on: April 20, 2004, 12:59:08 pm »
Hi all. I'm having several problems reverse engineering some C++ code I have:

1. "mutable" keyword isn't recognized;
2. operator() doesn't reverse properly. It creates a function called "operator" which takes no parameters;
3. EA doesn't seem to respect the "don't reverse engineer comments" options. I swear I have turned them all off, and no matter which menu I reverse the class(es) from, it brings in the comments and destroys my documentation.

Does anybody else have these problems?

Thanks in advance,
mitch

PS: Speaking of reverse-engineering, is CORBA IDL ever going to become reversible? I've heard rumours that it was, but they seem to have died off...

hellstern

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Problems with reverse engineering C++
« Reply #1 on: May 14, 2004, 04:35:20 am »
Hi,

I've got the same problem, too, working with EA 3.51 build 609.
I created a small test-class CTest with constructor CTest(), destructor ~CTest() and an operator like this:

.h
CTest& operator=(const Test& test);

.cpp
CTest& CTest::operator=(const CTest& test){
       mTestMember1 = test.mTestMember1;
}

I used EA for building up the class and the above code is the result of code engineering.
After reverse engineering the same (unchanged) code the operator= isn't correct anymore:
1. Return type is missing!
2. Operation name is now "operator =" (with a blank before '=').

Now I generate code again without change in EA file and get this:

.h
operator =(const CTest& test);

Does anybody know something about this?

Mitch

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Problems with reverse engineering C++
« Reply #2 on: August 24, 2004, 09:55:40 am »
I hate to bump my own topic, especially one that is several months old, but even with the latest patch of EA (4.1 - 734) I am still having these problems. Are these ever going to get fixed?

- The problem with my comments getting reverse-engineered over top of my documentation is positively infuriating. My company has a copyright logo at the top of every header file, and I'm sick of it replacing my actual class notes. I have turned off every option I can find that has to do with generating and reversing comments, and I don't generate code from the design using EA, I simply sync my classes. Oh, and it only happens to approximately 20% of my classes, and always the same ones;

- If the mutable keyword were simply disposed of during sync, I'd be happy;

- operator() is another annoying problem, as I write a lot of functors, each and every one having an operator() that gets sync'd improperly.

Anyhow, if someone could please ease my pain here with an answer, I would very, very much appreciate it.

Thanks,
mitch