Code generation for external elements

This topic shows you how the product generates code for external elements.

The following table lists how IBM® Rational® Rhapsody® generates code for external elements.

Table 1. Code generation for external elements
Element Type Description
Package The code generator does not generate code for an external package. However, you can map the package to a file or folder for a component (and then relate it to a file or directory). You can include the package in the component scope.

During code generation, a relation to a package is converted an #include to a file, if the package is mapped to a file for the component.

Class, object, or file The code generator does not generate code for an external class, object, or file.

During code generation, a relation to a class, object, or file is converted to an #include or a forward declaration.

Type The code generator does not generate code for an external type. A relation to a type is converted to an #include of its parent.
File (component) A file is external if all its elements are external.

If the CG::File::Generate property for a file is set to Cleared, the file becomes external and code is not generated for it.

To include a file in the build, set its CG::File::AddToMakefile property to Checked.


Feedback