ibm Rational Rhapsody 7.5 — Customizing the code writer

Customize C code generation Љ You add this plug-in information to the rhapsody.ini file, or provide the information necessary to have the plug-in run only for a certain profile. Љ During the code generation process, Rational Rhapsody checks whether the user-provided code has implemented the relevant “simplify” interface for the element in question. (These interfaces are defined in the Rational Rhapsody API.) Note: Rational Rhapsody provides you with sample projects that show the “simplify” interface. Look in the path>\Samples\CustomCG Samples path. For example, see the sample projects provided in the Statechart_Simplifier_Writer subfolder.

You should review the Readme.txt file that accompanies each sample project for details about that project. Љ If the user-provided code implements the “simplify” interface, your implementation is called. Љ The user-provided transformation code uses the Rational Rhapsody API to directly modify the way model elements are transformed. Customizing the code writer The rules for rules-based code generation are contained in the Rational Rhapsody Developer for C Writer project. You customize the rules with the use of the RulesComposer tool. The RulesPlayer code writer generates code from the simplified model using these rules.

The following topic describes the steps that are required if you want to customize the rules used for generating code from the simplified model. Note For detailed information on how to use the RulesComposer, see the tutorial PDF provided with the installation of the product (look in path>\Rhapsody\Sodius\RulesComposer\help\tutorial ). There is also a changes document for the RulesComposer that you might find useful (look in installation path>\Rhapsody\Sodius\RulesComposer\help ). 980 User Guide