Dependencies
Dependencies signify abstract links between objects.
There
are
several types of predefined dependencies
that can be tagged with stereotypes. The Usage
stereotype
is the only one that affects code generation in C. It implies a dependence
on services provided by another object.
Send
stereotype
is a tag
that indicates the sending of an event to another object. It has no
code generation side effects.You can also define other stereotypes for dependencies.
A dependency is different from a link. A dependency does not have any structural implications, but simply implies information that can be interpreted in several different ways. While a link has a semantic connection among multiple objects and it is an instance of an association.
The Usage
stereotype
for dependencies
is constructive, in that it changes the generated code depending on
the value assigned to the CG::Dependency::UsageType
property
for the dependency. The possible values for this property are as follows:
Specification
- an#include
statement is generated in the specification file of the dependent.Implementation
- an#include
statement is generated in the implementation file of the dependent.Existence
- a forward declaration is generated in the specification file of the dependent.