Modifying data types

You can create or edit a user-defined data type.

Procedure

  1. Open the Features window for the attribute.
  2. In the Attribute type area, clear the Use existing type check box.
  3. Type a declaration for the new type in the C++[Java] Declaration field using the proper syntax. Note the following information:
    • You can omit the semicolon at the end of the line; IBM® Rational® Rhapsody®automatically adds one if it is not present.
    • Substitute %s for the name of the type in the declaration. For example:
         typedef unsigned char %s[100]

      This translates to the following declaration in the generated code:

         typedef unsigned char msg_t[100];
  4. Add a description for the type on the Description tab.
  5. Click OK.

Results

Rational Rhapsody adds it to the Types category under the package to which the class belongs, rather than under the class itself.


Feedback