Documentation Language: Swift

Structure

ATLHelper

Represents an ATL helper function.

struct ATLHelper<BodyExpression> where BodyExpression : ATLExpression

Overview

ATL helpers extend the OCL standard library with custom operations that can be reused across transformation rules and other helpers. They support both contextual helpers (associated with a specific type) and contextual-free helpers (global functions).

Overview

Helpers in ATL serve multiple purposes:

Example Usage

// Contextual helper for Family!Member
let familyNameHelper = ATLHelper(
    name: "familyName",
    contextType: "Families!Member",
    returnType: "String",
    parameters: [],
    body: navigationExpression
)

// Context-free helper
let utilityHelper = ATLHelper(
    name: "formatName",
    contextType: nil,
    returnType: "String",
    parameters: [firstNameParam, lastNameParam],
    body: concatenationExpression
)

Topics

Operators

Initializers

?
init(name:contextType:returnType:parameters:body:)

Creates a new ATL helper function.

Instance Properties

V
body

The body expression that defines the helper’s computation.

V
contextType

The context type for contextual helpers, or nil for context-free helpers.

V
name

The name of the helper function.

V
parameters

The parameters accepted by the helper function.

V
returnType

The return type of the helper function.

Instance Methods

F
hashValue()

Get hash value for the helper’s identifying properties

F
isEqual(to:)

Check if two helpers are equal for their identifying properties

Default Implementations

Relationships

Conforms To

See Also

Modules and Rules

S
ATLModule

Represents an ATL (Atlas Transformation Language) module.

S
ATLMatchedRule

Represents an ATL matched rule for declarative transformation.

S
ATLCalledRule

Represents an ATL called rule for imperative transformation.