Object model diagrams Dependency menu In addition to the common operations (see Edit elements ), the menu for dependencies includes the following options: Љ Display Options specifies how dependencies are displayed. The following figure shows the display options for dependencies. Љ Select Dependency enables you to select a dependency. This functionality is useful when you have more than one dependency between the same elements. Constructive dependencies Rational Rhapsody supports the dependency stereotypes «Send» , «Usage» , and «Friend» .
Note If a class has a dependency on another class that is outside the scope of the component, Rational Rhapsody does not automatically generate an #include statement for the external class. You must set the «Usage» stereotype and the _CG::Class::SpecInclude property for the dependent class. Stereotypes are shown between guillemets ( «..» ) and are attached to the dependency line in the OMD, as shown in this example. The Properties tab in the Features window enables you to define the UsageType property for the dependency. This property determines how code is generated for dependencies to which a «Usage» stereotype is attached. The possible values for the UsageType property are as follows:
Љ Specification where an #include of the provider is generated in the specification file for the dependent. Љ Implementation where an #include of the provider is generated in the implementation file for the dependent. Љ Existence where a forward declaration of the provider is generated in the specification file for the dependent. For more information on stereotypes, see Stereotypes . 576 User Guide