Customizing the framework

The IBM® Rational® Rhapsody® framework is designed to be customized easily by creating classes that inherit from the framework classes.

Before you begin

To accomplish the customization within the product, create a class that inherits from an external class that represents the framework.

About this task

For example, to modify the active thread that Rational Rhapsody uses:

Procedure

  1. Create a class in the model called OMThread.
  2. Set the CG::Class::UseAsExternal property to Checked.

What to do next

You could then create a class in the model, MyThread, that defines the OMThread class as a superclass. By modifying MyThread, you can modify the framework virtual operations or add more attributes to the framework classes. To have the code generator use the customized behavior, set the appropriate properties (such as CPP_CG::Framework::ActiveBase). It is important to note that following this process facilitates migrating to new releases of Rational Rhapsody because no changes are done in the framework code itself. Before migrating to a new version, review the changes to determine whether they influence your framework customization.
Note: The product code generator gives special treatment to the classes specified in the framework base class properties. Always use the framework base class properties if a base class is derived from a framework class.

Feedback