Declaring #define preprocessor directives

IBM® Rational® Rhapsody® supports #define preprocessor directives that use the following format:

About this task

#define <identifier> <replacement list>

Typically, you declare a #define declarative in a C model is as follows:

To declare a #define declarative in a C++ model:

The reverse engineering tool imports the #defines according to the way they are modeled. However, if the comment for the #define is a multi-line, even though the #define itself is one line, the reverse engineering tool imports it as a type. For example:

#define SIZE 1024  /* my buffer
                      size */

To import all #define as a type, set the <lang>_ReverseEngineering::ImplementationTrait::ImportDefineAsType property to True.


Feedback