Linking Diagram Objects to Diagrams

 < Day Day Up > 



Reverse Engineering

Reverse engineering is a Describe™ feature that enables you to create class diagrams from existing source code. Reverse engineering can be used to start the design documentation process for an existing system. After all, a class diagram is worth a thousand raw source files.

More importantly, however, the reverse engineering feature can be used to update existing Describe™ systems when changes to source code have been made. In this section I will show you how to reverse engineer a set of source files and use the newly reverse engineered system to update an existing system.

Here is the scenario: Assume you have created all the robot rat classes necessary to implement the robot rat application. From the class diagram you generate your application framework code and then edit the framework code directly to compete the robot rat application. During implementation you may find it necessary to add class operations and attributes not captured in the initial design phase. At anytime during the implementation phase you can update the robot rat design by reverse engineering the modified source files into a new system, and then merging the new system into the robot rat system.

click to expand
Figure 20-26: Reverse Engineering Dialog

To start the reverse engineering process from the Tools menu select Reverse Engineer. This results in the Reverse Engineering dialog shown in figure 20-26. In the Reverse Engineering dialog you select the language, methodology, and add any source files you want to reverse engineer. When you have added all the necessary files click the OK button. You will then be asked to name the new system and set various other system properties as shown in figure 20-27.

click to expand
Figure 20-27: Step 2 in the Reverse Engineering Process: Naming the New System and Setting Various System Properties

When you have named the new system and set the other system properties according to your needs, click the continue button. Describe™ will start to reverse engineer your source files. Progress is shown in the REProgress window shown in figure 20-28.

click to expand
Figure 20-28: REProgress Window

Merging Systems

When you have finished reverse engineering your updated source code you can merge the newly created system into the existing robot rat system. To merge systems, both systems must be open. You want to merge the newly reverse engineered system into the existing system, so, select a class diagram in the robot rat system and from the Tools menu select Merge System. This will result in the Merge System dialog shown in figure 20-29.

click to expand
Figure 20-29: Merge System Dialog

Select the system you want to merge into the existing system and click the OK button. As the system merge takes place you will see a dialog giving you a report of each new system object being added to the existing system.



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net