IBM® 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 <lang>_CG::Class::SpecInclude property
for the dependent class.
Stereotypes are shown between guillemets («..»)
and are attached to the dependency line in the object model diagram,
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.