Documentation Language: Swift

Protocol

ENamedElement

Base protocol for model elements that have a name.

protocol ENamedElement : EModelElement

Overview

ENamedElement extends EModelElement to add a name attribute, making it the base for most metamodel constructs including:

The name is used for identification within the model and typically must be unique within its containing element (e.g., attribute names must be unique within a class).

Usage

struct MyAttribute: ENamedElement {
    let id: EUUID
    let eClass: MyClassifier
    var name: String
    var eAnnotations: [EAnnotation] = []

    init(name: String) {
        self.id = EUUID()
        self.eClass = MyClassifier(name: "EAttribute")
        self.name = name
    }
}

Topics

Instance Properties

V
name

The name of this element.

Relationships

Inherits From

Conforming Types

See Also

Supporting Types

S
EFactory

A factory for creating instances of model elements.

P
EModelElement

Base protocol for model elements that can have annotations.