Roundtripping properties

IBM® Engineering Systems Design Rhapsody® includes many properties to control roundtripping. They are specified in <lang>_Roundtrip, where <lang> is the programming language. For example, in Rhapsody Developer for C, these properties are in C_Roundtrip; in Rhapsody Developer for C++, they are in CPP_Roundtrip.

A definition for each property is provided on the applicable Properties tab of the Features window. The following table lists the properties that control roundtripping.

Property Description
General::NotifyOnInvalidatedModel Determines whether a warning window is displayed during roundtrip. This warning is displayed when information might get lost because the model was changed between the last code generation and the roundtrip operation.

This property is available only in Rhapsody Developer for C and Rhapsody Developer for C++.

General::ParserErrors Specifies the behavior of roundtrip when a parser error is encountered.
General::PredefineIncludes Specifies the predefined include path for roundtripping.

This property is available only in Rhapsody Developer for C, C++, and Java.

General::PredefineMacros Specifies the predefined macros for roundtripping.

This property is available only in Rhapsody Developer for C and Rhapsody Developer for C++.

General::ReportChanges Defines which changes are reported (and displayed) by the roundtrip operation.

This property is available only in Rhapsody Developer for C, C++, and Java.

General::RestrictedMode The RestrictedMode property is a Boolean value (Checked or Cleared) that specifies whether restricted-mode roundtripping is available. This property can be modified on the configuration level. (Default = Cleared)

Restricted mode of Advanced (Full) roundtrip enables you to roundtrip unusual usage of Rhapsody elements, such as a class declaration in a user-defined type. Restricted mode has more restrictions, but preserves the model from unexpected changes. The additional conditions for restricted mode are as follows:

  • User-defined types cannot be removed or changed on roundtrip because Rhapsody code generation adds the "Ignore" annotation for a user-defined type declaration.
  • Relations cannot be removed or changed on roundtrip.
  • New classes are not added to the model.

This property is available only in Rhapsody Developer for C and Rhapsody Developer for C++.

General::RoundtripScheme Specifies whether to perform a Basic, Advanced (for C, C++, and Java only ), or Respect (for C and C++ only) roundtrip.

Basic is the default for Ada, Advanced for Java, and Respect for C and C++.

Update::AcceptChanges The AcceptChanges property is an enumerated type that specifies which changes are applied to each code generation element (attribute, operation, type, class, or package).

You can apply separate properties to each type of code generation element.

The possible values are as follows:

  • Default means that all the changes can be applied to the model element, including deletion. However, note that deletion is disabled for classes, actors, and objects. In addition, deletion is disabled if Rhapsody finds parser errors in the roundtripped code. This is the default value.
  • All means all the changes can be applied to the model element. There are no exceptions (as there are for the Default value).
  • NoDelete means all the changes except deletion can be applied to the model element. This setting prevents accidental removal of operations, constructors, attributes, relations, variables, instances, and functions.
  • AddOnly means to apply only the addition of an aggregate to the model element. You cannot delete or change elements.
  • NoChanges means do not apply any changes to the model element.

The value of the property is propagated to all the aggregates of an element. Therefore, if a package has the property value NoChanges, no elements in that package will be changed.

This property is available only in Rhapsody Developer for C, C++, and Java.