Book a Demo

Author Topic: Creating issues, C++  (Read 2586 times)

Nadya

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Creating issues, C++
« on: October 25, 2007, 09:35:00 am »
 I use EA Version 7.0.817 (Build: 817) on C++ source code base.

I'm trying to update my project from source code and use  Import Source Directory command for that.

I've noticed that if there is a new class in the code and it is located in cpp file, EA creates two classes instead of one.
The only difference between them is the File name. In one case it shows header path, in another cpp one. Then I try to view source code of header's class, the header gets opened without any errors.

I think I didn't have anything like this in EA 6.5.
Is it a bug?

Thanks

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Creating issues, C++
« Reply #1 on: October 25, 2007, 10:50:27 am »
Hi Nadya,

I think EA has always behaved this way.  EA, correctly, assumes that if it has two classes with the same name (but in two locations) then they are two different classes (that just happen to have the same name).

Now this is fine for languages that have only one location where class specifications exist (such as C# before partial classes).

However, specifically in the case of C++ - where you have an implementation in one file and a specification in an other, related, file. It should be able to work out that we are talking about two aspects of the same class.

If both files reside in the same folder, and the implementation points to the specification then it's relatively easy (even for EA  ;)) to get it right.  However, if they're in separate folders, then it's more problematic.

So, in summary, this bug has always been there.  You just haven't tripped across it before.  Please report it to Sparx using the usual mechanism.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Nadya

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating issues, C++
« Reply #2 on: October 26, 2007, 05:32:11 am »
I need to clarify it, I suppose.
The class is declared in cpp file, and there is no such class in header file. However, EA has created two classes: One for header and another for cpp file.
There was such a bug in EA 6.5, it's true.

:( :( :(

I will report it.

Thanks, Paolo
« Last Edit: October 26, 2007, 05:33:03 am by Nadya »