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

Posted on 2005-04-16
Last Modified: 2012-05-07
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 .
Question by:hansol1

    Author Comment

    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.
    LVL 39

    Accepted Solution

    >>>> 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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now