Rose/Corba mapping: introduction, IDL mapping

Страницы работы

Содержание работы

ROSE / CORBA MAPPING

01 June, 1998

1  INTRODUCTION

This document describes the proposed mapping for Rose/CORBA.  The intent of this product in the short term is to do roundtrip engineering for CORBA IDL 2.2.  As such, it will replace the current Rose/IDL capability and be available with Rose 98 Enterprise Dublin release.

The document has five major sections.  The first defines terms which are used in subsequent sections.  The second describes the mapping of IDL constructs to Rose modeling elements.  The third and fourth describe functionality particular to forward and reverse engineering, respectively.  The last defines the Rose/CORBA property sets.

2  DEFINITION OF TERMS

Integer type – denotes one of the following: short, long, long long, unsigned short, unsigned long, unsigned long long

Floating type – denotes one of the following: float, double, long double

Fundamental type – denotes one of the following:  integer type, floating type, char, wchar, boolean, octet, any, Object

Template type – denotes one of the following IDL constructs:  sequence, string, wstring, fixed.

3  IDL MAPPING

This section is organized by IDL construct.  For each construct the following items are provided, as appropriate:

·  How the construct maps to a Rose element(s).

·  A semantic definition of the construct.  Within this definition, normal font is used for literal text and italics are used for text which corresponds to something in the Rose model.

·  A definition of how the italicized items map to Rose model elements.

·  Property definition and usage.

·  Notes.

3.1  INCLUDE Path

Maps to the Project.IncludePath property which is a semicolon-delimited list of fully qualified directory names.  This is appended to the INCLUDE environment variable to create an extended INCLUDE path used during both forward and reverse engineering to resolve the physical location of IDL files.

PROPERTIES

Project Properties

·  IncludePath (String "") - Extend the INCUDE Path environment variable with additional entries.

3.2  DIRECTORY

Maps to a Rose component package.  The name of the package is the same as the name of the directory.

3.3  IDL FILE

Maps to a Rose component whose assigned language is CORBA.  The name of the component is the same as the simple name of the file.  The extension of the file is "idl". 

3.4  #INCLUDE

Maps to a dependency relationship between components or any kind of relationship between classes which are not realized in the same file.

IDL SEMANTICS

#include "pathname"

pathname – see the Generating #include and Forward References section for a description of how this is generated

3.5  MODULE

Maps to a Rose logical package with the stereotype <CORBAModule>.  Hierarchical module structures are supported via Rose's natural hierarchical package functionality.

IDL SEMANTICS

module identifier { definition_1; definition_2, … }

identifier = package name

definition = can be a module, interface (including a forward decl), exception, constant, typedef, struct, union, or enum.

Note: A CORBA module is implemented in a file.  The Rose equivalent of this relationship is the idea that a logical package should be assigned to a component.  Since Rose does not allow this type of assignment we must rely on all the classes which derive from a given logical package being assigned to the appropriate component. 

Suggestion:  We will provide a menu option to allow the user to easily view, set and/or change the logical package to component assignments.  Assigning a logical package to a component will automatically assign all the derived classes to the component.  Forward engineering will check for a consistent definition and provide a dialog to correct it if necessary.

3.6  CONSTANT

Maps to a Rose class with stereotype <CORBAConstant>.

IDL SEMANTICS

            const const_type identifier = const_exp;

const_type = class.ImplementationType property – see Note below for valid values

identifier = class name

const_exp = class.ConstValue property

PROPERTIES:

Class Properties

·  ImplementationType (String "") – Constant type

·  ConstValue (String "") – Constant value

Note:  The valid values for the type field of a const are:  integer type, floating type, char, wchar, boolean, string, wstring, fixed, and a scoped name.

3.7  ENUM

Maps to Rose class with stereotype <CORBAEnum>.

IDL SEMANTICS

            enum identifier {enum1, enum2, …};

identifier = class name

enum1, enum2, … = name of nth attribute

PROPERTIES

Attribute Properties

·  Order (String "") – Integer which defines the ordering of the enumerated items.  If this property is not used the order is determined by the internal ordering of the Rose model.

Похожие материалы

Информация о работе