IBM Support

Control how Rhapsody models a usage dependency when generating code.

Education


Abstract

Dependency is a directed relationship which is used to show that some UML element or a set of elements requires, needs or depends on other model elements for specification or implementation.

Content

When you model a usage dependency, you can use the UsageType property (CG::Dependency::UsageType) to control how the dependency is reflected in the generated code. The possible values are:

*  Existence - a forward declaration is generated in the specification file
*  Specification - an #include statement is generated in the specification file
*  Implementation - a forward declaration is generated in the specification file, and an #include statement is generated in the implementation file

Note that the code generated also depends on the value of the property [lang]_CG::Dependency::GenerateForwardDeclarations. If GenerateForwardDeclarations is set to True, code is generated as described above. However, if GenerateForwardDeclarations is set to False, then the specification file will not contain a forward declaration even if the value of UsageType is set to Existence or Implementation.

NOTE: This is not applicable to Ada code generation.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rhapsody

Document Information

Modified date:
27 May 2022

UID

ibm10720273