Rose/Corba mapping: introduction, IDL mapping, страница 6

If an attempt is made to forward engineer any components whose assigned language is not CORBA a warning is generated.

4.2  Mapping Components to the File System

An IDL component and its hierarchy of parent packages represent a relative path in the file system.  The package names are used as the directory names, the component name is used as the file name and "idl" is used as the file extension.  During forward engineering this relative path is rooted in an absolute path in the file system.

An attempt is made to locate the topmost directory in one of the INCLUDE Path entries.  If it cannot be located, a dialog is presented which allows the user to map the component to an entry in the INCLUDE Path.

4.3  Creating File System Elements

If any of the directories in the path do not exist and the Project.CreateDirectories property is TRUE the directories are created. 

If the target file already exists the existing file is saved as a backup before being overwritten.  The name of the backup file is identical to that of the target file except that its extension is set to "~id".

4.4  Generating #include and Forward References

Any dependency relationship whose client is the component being forward engineered generates a #include statement which reference the file represented by the supplier component.

Any relationship (generalization, dependency, or association) whose client is a class being forward engineered generates a #include statement which references the file in which the supplier class would be implemented.  If this file is the same as that of the client class no #include is generated.

The pathname generated in a #include statement is scoped to be relative to the INCLUDE path.

For a dependency or association between classes, if the Uses.GenerateForwardReference or Role.GenerateForwardReference property respectively, is set to TRUE a forward reference to the class in question is generated rather than a #include of its file.  The supplier class must represent an IDL interface.

4.5  Generating IDL Modules

A logical package stereotyped as <CORBAModule> is realized as an IDL module when forward engineered.  The name of the package is used as the name of the module.

A logical package can be defined to provide organization to the logical view without affecting the IDL module hierarchy by not stereotyping it as <CORBAModule>.


5.1  Mapping File System Elements to the Rose Model

The parent directory hierarchy of a reverse engineered IDL file is realized in the Rose model as a hierarchy of packages rooted in the Component View.  The IDL file is realized as a component in the package which represents its parent directory.

If the IDL file exists directly in a directory which is an INCLUDE Path entry it is realized as a component in the Component View package.

5.2  Creating Rose Model Elements

If the required component package hierarchy exists it is used.  Otherwise it is created.  The names of the directories are used as the names of the packages.

The IDL file is realized as a component with the same name as the file minus its extension.  If such a component already exists within the appropriate package hierarchy it is used.  Otherwise it is created.

5.3  Reverse Engineering a #include

Each #include in a file being reverse engineered generates a dependency from the component representing the client file to the component representing the supplier file.

5.4  Reverse Engineering an IDL Module

IDL module hierarchies are realized as logical package hierarchies rooted in the Logical View.  If such a hierarchy already exists it is used.  Otherwise it is created.  The names of the modules are used as the names of the packages.


This section provides a definition of the Rose/CORBA property sets by Rose model element. Each property is annotated as ORIG (holdover property from previous Rose/IDL version), NEW (new property for this version), or DEL (a property from the previous version which will no longer be used in this version).