Generating code for links
The code for run-time connection of objects is based on links.
About this task
The connection code is generated when the following conditions are met:
- Links are specified with an association.
- The objects connected by the link has an owner
(composite class or object) or are global (both objects are owned
by a package).
If the objects are parts of a composite, the link is owned by the composite. When the objects are global, the link is owned by a package. Links across packages are initialized by the component. - The package and objects for the link are in the scope of the generated component.
- The
CG::Component::InitializationScheme
property for the component is set toByComponent
for links across packages. - If more than one link exists between two objects over the same relation, Rhapsody® arbitrarily chooses which link to instantiate. The packages that contain the objects are given priority in this decision.