Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Cross References
Topics
Topic |
Detail |
See also |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Abstract |
Cross References are an important part of transformations. They are used to:
Each cross reference has three different parts:
When writing the templates for a transformation, it is easiest to create the cross references using the TRANSFORM_REFERENCE macro that is defined for this purpose. It has three optional parameters. TRANSFORM_REFERENCE(<name>, <sourceGuid>, <namespace>) This generates a reference that can be used in the ways described above. It resembles the following.
XRef{namespace="<namespace>" name="<name>" source="<sourceGuid>"
Where:
The only time that this should be specified is when creating a connector to a Class created in a different transformation. A good example of the use of cross references is in the DDL templates provided with Enterprise Architect. In the Class template a cross reference is created with the name "Table". Then up to two different connectors can be created, each of which must identify the two Classes it connects using cross references while having its own unique cross reference.
|
|
||||||||||||||||||||
Specify Classifiers |
Objects, attributes, operations and parameters can all reference another element in the model as their type. When this type is created from a transformation you must use a cross reference to specify it, using the TRANSFORM_CLASSIFIER macro. TRANSFORM_CLASSIFIER(<name>, <sourceGuid>, <namespace>) Generates a cross reference within a classifier element, where the parameters are identical to the TRANSFORM_REFERENCE macro but the name Classifier is generated instead of XRef. If the target classifier already exists in the model before the transformation, a TRANSFORM_CLASSIFIER is inappropriate and instead the GUID can be given directly to a classifier attribute. If a classifier is specified for any type it overrides the type specified.
|
|