Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 17: CORBA/IDL Code Generation and Reverse Engineering

Generalizations Generated for a Union

A generalization with a union is much the same as a generalization with all other CORBA types, except interface. Because generalizations are not supported with a union, they will not appear in the generated code. The only reference to the parent in the generated code is an #include statement. The code looks like this:

//Source file: C:/corba/Child.idl

#ifndef __CHILD_DEFINED #define __CHILD_DEFINED

/* CmIdentification %X% %Q% %Z% %W% */

#include "Parent.idl"

union Child switch() { };

#endif

Reverse Engineering CORBA Source Code

You can reverse engineer CORBA source code into your Rose model. Each .idl file that you reverse engineer will be modeled as a component in Rose. The classes, relationships, and other elements in the file will appear in the Logical view.

To begin the process, first select Tools → CORBA → Project Specification. In the Directories field, select the directories that contain the source code you wish to reverse engineer.

Once you complete this step, select Tools → CORBA → Reverse Engineer CORBA. In the reverse−engineering window, select the file(s) you wish to reverse engineer and press Add. Once all files have been added to the lower window, select the file(s) in the lower window to reverse engineer and press Reverse. If any errors occur during the reverse−engineering process, a note will be entered in the log window.

608