Book a Demo

Author Topic: Importing Source Code: abstract classes  (Read 2932 times)

MatthiasH

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Importing Source Code: abstract classes
« on: August 05, 2009, 11:58:50 pm »
Hi,

currently we are evaluating EA 7.5 846 "Professional" Trial version.

After importing a larger C++ source code tree (which worked fine), I found that EA does not mark abstract classes. I have to manually set the check box "Abstract" in the properties dialog for each class.

With a large class hierarchy I need tool support to automatically mark a class as abstract.

Is this a limitation of EA's reverse engineering or did I miss something?

Thanks,
Matthias
« Last Edit: August 06, 2009, 02:14:11 am by mhildebrand »

MatthiasH

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Importing Source Code: abstract classes
« Reply #1 on: August 06, 2009, 10:38:17 pm »
...even worse, I just found that after setting the abstract checkbox manually, then doing a Code Sync, the abstraxct checkbox is cleared.

This means with C++ round trip engineering the abstract checkbox cannot be used.

Do I misunderstand something? An abstract class is a class that cannot be instantiated due to one or more pure virtual functions. Right?
Or is there a different understandig in context of EA / UML?

Thanks,
Matthias

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Importing Source Code: abstract classes
« Reply #2 on: August 07, 2009, 12:16:59 am »
Hi Matthias,

That's what the UML2.2 specification tells us about the 'isAbstract' attribute:

Quote
7.3.8 Classifier (from Kernel, Dependencies, PowerTypes)
...
Attributes:
  • isAbstract: Boolean

If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract
classifier is intended to be used by other classifiers (e.g., as the target of general metarelationships or generalization
relationships). Default value is false.
[/list]

I agree with you that the EA Code Engineering features for C++ should interpret occurrence of pure virtual methods, to be incomplete declaration of a class and set the 'isAbstract' attribute for such classes.

WBR
Günther