• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Problem with Reverse engineering while using C++ Analyzer (Rational Rose)

Hello Friends
I am trying to generate class diagram from the well complied source .While trying to get the diagram I am getting many errors and not able to find out where I am doing mistake.Some of the erorrs are

Line 22:22: can't find anything named CWinApp
line 30:1 : Expected ';', saw public
Can you please help me out .
1 Solution
hansol1Author Commented:
Now I am created the class diagram but not able to established the reationship between them.can any one tell me how to create relationship between them.
>>>> Line 22:22: can't find anything named CWinApp

CWinApp is an MFC class that is defined in afxwin.h (included by stdafx.h).

>>>> Now I am created the class diagram

Actually, I would need some source code to be able to help you ...

>>>>  how to create relationship between them.

You could parse the class definitions as a compiler does... Or you derive all classes by one baseclass and implement a baseclass function, e. g. getClassInfo ..

class BaseClass
      vector<string>  classNames;
      BaseClass() { classNames.push_back("BaseClass");  }
      vector<string>& getClassInfo() { return classNames; }

In case of multiple inheritance you would need a tree container rather than a vector.

However, that method would create much overhead and it isn't applicable if you need to use foreign class libraries like MFC.

Regards, Alex

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now