Structure
ATLTargetPattern
Represents a target pattern for element creation in ATL rules.
struct ATLTargetPattern
Overview
Target patterns define the output specifications for both matched and called rules. They specify the type of target elements to create, variable binding for reference within the rule, and property bindings that define the relationships and values for the created elements.
Overview
Target patterns support several key features:
-
Element creation: Automatic instantiation of target metamodel elements
-
Property binding: Declarative specification of property values
-
Reference resolution: Automatic handling of cross-references and containment
-
Variable scoping: Local variables accessible to other patterns and expressions
Example Usage
let personPattern = ATLTargetPattern(
variableName: "targetPerson",
type: "Persons!Person",
bindings: [
"fullName": ATLVariableExpression(name: "s.firstName"),
"gender": ATLHelperCallExpression(helperName: "determineGender", arguments: [])
]
)
Topics
Operators
Initializers
Creates a new ATL target pattern.
Instance Properties
Property bindings that define values for the created element.
The type of target element to create.
The variable name for binding the created target element.