ibm Rational Rhapsody 7.5 — Composite types

Classes and types Composite types Rational Rhapsody enables you to create composite types that are modeled using structural features instead of verbatim, language-specific text. In addition, Rational Rhapsody includes classes wherever types are used to increase the maintainability of models: if you change the name of a class, the change is propagated automatically throughout all of the references to it. To create a composite type: 1. Right-click a package or the Types category, then select Add New > Type . 2. Edit the default name for the type. 3. Open the Features window for the new type. The Type window opens. 4. If wanted, specify a stereotype for the type. 5.

Specify the kind of data type using the Kind list. The possible values are as follows: a. Enumeration specifies the new type is an enumerated type. Specify the enumerated values on the Literals tab. For more information, see Creating enumerated types . b. Language specifies the new type is a language-specific construct. This is the default value. For more information, see Creating language types . c. Structure specifies the new type is a structure, which is a data record. For more information, see Creating structures . d. Typedef specifies the new type is a typedef . For more information, see Creating Typedefs . e.

Union specifies the new type is a union, which is an overlay definition of a data record. For more information, see Creating unions . See the appropriate data type to continue the creation process. The following table shows the mapping of composite types to the different languages. 106 User Guide Type Kind Ada C and C++ Java Language As in previous versions As in previous versions As in previous versions Structure Not supported struct1 N/A Union Not supported union N/A Enumeration Enumeration types enum N/A Typedef Subtypes (in simple cases) or subtype typedef N/A