@lionweb/delta-protocol-test-cli 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,914 @@
1
+ // Copyright 2025 TRUMPF Laser SE and other contributors
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License")
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ //
15
+ // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
+ // SPDX-License-Identifier: Apache-2.0
17
+ // Warning: this file is generated!
18
+ // Modifying it by hand is useless at best, and sabotage at worst.
19
+ /*
20
+ * language's metadata:
21
+ * name: Shapes
22
+ * version: 1
23
+ * key: key-Shapes
24
+ * id: id-Shapes
25
+ */
26
+ import { Annotation, Concept, Containment, Enumeration, EnumerationLiteral, Interface, Language, PrimitiveType, Property, Reference } from "@lionweb/core";
27
+ import { LionCore_builtinsBase, NodeBase, OptionalMultiContainmentValueManager, OptionalMultiReferenceValueManager, OptionalPropertyValueManager, OptionalSingleContainmentValueManager, OptionalSingleReferenceValueManager, RequiredMultiContainmentValueManager, RequiredMultiReferenceValueManager, RequiredPropertyValueManager, RequiredSingleContainmentValueManager, RequiredSingleReferenceValueManager } from "@lionweb/class-core";
28
+ export class ShapesBase {
29
+ constructor() {
30
+ this._language = new Language("Shapes", "1", "id-Shapes", "key-Shapes");
31
+ this._Circle = new Concept(this._language, "Circle", "key-Circle", "id-Circle", false);
32
+ this._Circle_r = new Property(this._Circle, "r", "key-r", "id-r");
33
+ this._Circle_center = new Containment(this._Circle, "center", "key-center", "id-center");
34
+ this._Coord = new Concept(this._language, "Coord", "key-Coord", "id-Coord", false);
35
+ this._Coord_x = new Property(this._Coord, "x", "key-x", "id-x");
36
+ this._Coord_y = new Property(this._Coord, "y", "key-y", "id-y");
37
+ this._Coord_z = new Property(this._Coord, "z", "key-z", "id-z");
38
+ this._Geometry = new Concept(this._language, "Geometry", "key-Geometry", "id-Geometry", false).isPartition();
39
+ this._Geometry_shapes = new Containment(this._Geometry, "shapes", "key-shapes", "id-shapes").isOptional().isMultiple();
40
+ this._Geometry_documentation = new Containment(this._Geometry, "documentation", "key-documentation", "id-documentation").isOptional();
41
+ this._IShape = new Interface(this._language, "IShape", "key-IShape", "id-IShape");
42
+ this._IShape_uuid = new Property(this._IShape, "uuid", "key-uuid", "id-uuid");
43
+ this._IShape_fixpoints = new Containment(this._IShape, "fixpoints", "key-fixpoints", "id-fixpoints").isOptional().isMultiple();
44
+ this._Line = new Concept(this._language, "Line", "key-Line", "id-Line", false);
45
+ this._Line_start = new Containment(this._Line, "start", "key-start", "id-start");
46
+ this._Line_end = new Containment(this._Line, "end", "key-end", "id-end");
47
+ this._OffsetDuplicate = new Concept(this._language, "OffsetDuplicate", "key-OffsetDuplicate", "id-OffsetDuplicate", false);
48
+ this._OffsetDuplicate_offset = new Containment(this._OffsetDuplicate, "offset", "key-offset", "id-offset");
49
+ this._OffsetDuplicate_source = new Reference(this._OffsetDuplicate, "source", "key-source", "id-source");
50
+ this._OffsetDuplicate_altSource = new Reference(this._OffsetDuplicate, "altSource", "key-alt-source", "id-alt-source").isOptional();
51
+ this._OffsetDuplicate_docs = new Containment(this._OffsetDuplicate, "docs", "key-docs", "id-docs").isOptional();
52
+ this._OffsetDuplicate_secretDocs = new Containment(this._OffsetDuplicate, "secretDocs", "key-secret-docs", "id-secret-docs").isOptional();
53
+ this._Shape = new Concept(this._language, "Shape", "key-Shape", "id-Shape", true);
54
+ this._Shape_shapeDocs = new Containment(this._Shape, "shapeDocs", "key-shape-docs", "id-shape-docs").isOptional();
55
+ this._CompositeShape = new Concept(this._language, "CompositeShape", "key-CompositeShape", "id-CompositeShape", false);
56
+ this._CompositeShape_parts = new Containment(this._CompositeShape, "parts", "key-parts", "id-parts").isMultiple();
57
+ this._CompositeShape_disabledParts = new Containment(this._CompositeShape, "disabledParts", "key-disabled-parts", "id-disabled-parts").isMultiple();
58
+ this._CompositeShape_evilPart = new Containment(this._CompositeShape, "evilPart", "key-evil-part", "id-evil-part");
59
+ this._ReferenceGeometry = new Concept(this._language, "ReferenceGeometry", "key-ReferenceGeometry", "id-ReferenceGeometry", false).isPartition();
60
+ this._ReferenceGeometry_shapes = new Reference(this._ReferenceGeometry, "shapes", "key-shapes-references", "id-shape-references").isOptional().isMultiple();
61
+ this._Documentation = new Annotation(this._language, "Documentation", "key-Documentation", "id-Documentation");
62
+ this._Documentation_text = new Property(this._Documentation, "text", "key-text", "id-text").isOptional();
63
+ this._Documentation_technical = new Property(this._Documentation, "technical", "key-technical", "id-technical").isOptional();
64
+ this._BillOfMaterials = new Annotation(this._language, "BillOfMaterials", "key-BillOfMaterials", "id-BillOfMaterials");
65
+ this._BillOfMaterials_materials = new Reference(this._BillOfMaterials, "materials", "key-materials", "id-materials").isOptional().isMultiple();
66
+ this._BillOfMaterials_groups = new Containment(this._BillOfMaterials, "groups", "key-groups", "id-groups").isOptional().isMultiple();
67
+ this._BillOfMaterials_altGroups = new Containment(this._BillOfMaterials, "altGroups", "key-alt-groups", "id-alt-groups").isOptional().isMultiple();
68
+ this._BillOfMaterials_defaultGroup = new Containment(this._BillOfMaterials, "defaultGroup", "key-default-group", "id-default-group").isOptional();
69
+ this._MaterialGroup = new Concept(this._language, "MaterialGroup", "key-MaterialGroup", "id-MaterialGroup", false);
70
+ this._MaterialGroup_matterState = new Property(this._MaterialGroup, "matterState", "key-matter-state", "id-matter-state").isOptional();
71
+ this._MaterialGroup_materials = new Reference(this._MaterialGroup, "materials", "key-group-materials", "id-group-materials").isMultiple();
72
+ this._MaterialGroup_defaultShape = new Containment(this._MaterialGroup, "defaultShape", "key-default-shape", "id-default-shape").isOptional();
73
+ this._MatterState = new Enumeration(this._language, "MatterState", "key-MatterState", "id-MatterState");
74
+ this._MatterState_solid = new EnumerationLiteral(this._MatterState, "solid", "key-solid", "id-solid");
75
+ this._MatterState_liquid = new EnumerationLiteral(this._MatterState, "liquid", "key-liquid", "id-liquid");
76
+ this._MatterState_gas = new EnumerationLiteral(this._MatterState, "gas", "key-gas", "id-gas");
77
+ this._Time = new PrimitiveType(this._language, "Time", "key-Time", "id-Time");
78
+ this._wiredUp = false;
79
+ }
80
+ get language() {
81
+ this.ensureWiredUp();
82
+ return this._language;
83
+ }
84
+ get Circle() {
85
+ this.ensureWiredUp();
86
+ return this._Circle;
87
+ }
88
+ get Circle_r() {
89
+ this.ensureWiredUp();
90
+ return this._Circle_r;
91
+ }
92
+ get Circle_center() {
93
+ this.ensureWiredUp();
94
+ return this._Circle_center;
95
+ }
96
+ get Coord() {
97
+ this.ensureWiredUp();
98
+ return this._Coord;
99
+ }
100
+ get Coord_x() {
101
+ this.ensureWiredUp();
102
+ return this._Coord_x;
103
+ }
104
+ get Coord_y() {
105
+ this.ensureWiredUp();
106
+ return this._Coord_y;
107
+ }
108
+ get Coord_z() {
109
+ this.ensureWiredUp();
110
+ return this._Coord_z;
111
+ }
112
+ get Geometry() {
113
+ this.ensureWiredUp();
114
+ return this._Geometry;
115
+ }
116
+ get Geometry_shapes() {
117
+ this.ensureWiredUp();
118
+ return this._Geometry_shapes;
119
+ }
120
+ get Geometry_documentation() {
121
+ this.ensureWiredUp();
122
+ return this._Geometry_documentation;
123
+ }
124
+ get IShape() {
125
+ this.ensureWiredUp();
126
+ return this._IShape;
127
+ }
128
+ get IShape_uuid() {
129
+ this.ensureWiredUp();
130
+ return this._IShape_uuid;
131
+ }
132
+ get IShape_fixpoints() {
133
+ this.ensureWiredUp();
134
+ return this._IShape_fixpoints;
135
+ }
136
+ get Line() {
137
+ this.ensureWiredUp();
138
+ return this._Line;
139
+ }
140
+ get Line_start() {
141
+ this.ensureWiredUp();
142
+ return this._Line_start;
143
+ }
144
+ get Line_end() {
145
+ this.ensureWiredUp();
146
+ return this._Line_end;
147
+ }
148
+ get OffsetDuplicate() {
149
+ this.ensureWiredUp();
150
+ return this._OffsetDuplicate;
151
+ }
152
+ get OffsetDuplicate_offset() {
153
+ this.ensureWiredUp();
154
+ return this._OffsetDuplicate_offset;
155
+ }
156
+ get OffsetDuplicate_source() {
157
+ this.ensureWiredUp();
158
+ return this._OffsetDuplicate_source;
159
+ }
160
+ get OffsetDuplicate_altSource() {
161
+ this.ensureWiredUp();
162
+ return this._OffsetDuplicate_altSource;
163
+ }
164
+ get OffsetDuplicate_docs() {
165
+ this.ensureWiredUp();
166
+ return this._OffsetDuplicate_docs;
167
+ }
168
+ get OffsetDuplicate_secretDocs() {
169
+ this.ensureWiredUp();
170
+ return this._OffsetDuplicate_secretDocs;
171
+ }
172
+ get Shape() {
173
+ this.ensureWiredUp();
174
+ return this._Shape;
175
+ }
176
+ get Shape_shapeDocs() {
177
+ this.ensureWiredUp();
178
+ return this._Shape_shapeDocs;
179
+ }
180
+ get CompositeShape() {
181
+ this.ensureWiredUp();
182
+ return this._CompositeShape;
183
+ }
184
+ get CompositeShape_parts() {
185
+ this.ensureWiredUp();
186
+ return this._CompositeShape_parts;
187
+ }
188
+ get CompositeShape_disabledParts() {
189
+ this.ensureWiredUp();
190
+ return this._CompositeShape_disabledParts;
191
+ }
192
+ get CompositeShape_evilPart() {
193
+ this.ensureWiredUp();
194
+ return this._CompositeShape_evilPart;
195
+ }
196
+ get ReferenceGeometry() {
197
+ this.ensureWiredUp();
198
+ return this._ReferenceGeometry;
199
+ }
200
+ get ReferenceGeometry_shapes() {
201
+ this.ensureWiredUp();
202
+ return this._ReferenceGeometry_shapes;
203
+ }
204
+ get Documentation() {
205
+ this.ensureWiredUp();
206
+ return this._Documentation;
207
+ }
208
+ get Documentation_text() {
209
+ this.ensureWiredUp();
210
+ return this._Documentation_text;
211
+ }
212
+ get Documentation_technical() {
213
+ this.ensureWiredUp();
214
+ return this._Documentation_technical;
215
+ }
216
+ get BillOfMaterials() {
217
+ this.ensureWiredUp();
218
+ return this._BillOfMaterials;
219
+ }
220
+ get BillOfMaterials_materials() {
221
+ this.ensureWiredUp();
222
+ return this._BillOfMaterials_materials;
223
+ }
224
+ get BillOfMaterials_groups() {
225
+ this.ensureWiredUp();
226
+ return this._BillOfMaterials_groups;
227
+ }
228
+ get BillOfMaterials_altGroups() {
229
+ this.ensureWiredUp();
230
+ return this._BillOfMaterials_altGroups;
231
+ }
232
+ get BillOfMaterials_defaultGroup() {
233
+ this.ensureWiredUp();
234
+ return this._BillOfMaterials_defaultGroup;
235
+ }
236
+ get MaterialGroup() {
237
+ this.ensureWiredUp();
238
+ return this._MaterialGroup;
239
+ }
240
+ get MaterialGroup_matterState() {
241
+ this.ensureWiredUp();
242
+ return this._MaterialGroup_matterState;
243
+ }
244
+ get MaterialGroup_materials() {
245
+ this.ensureWiredUp();
246
+ return this._MaterialGroup_materials;
247
+ }
248
+ get MaterialGroup_defaultShape() {
249
+ this.ensureWiredUp();
250
+ return this._MaterialGroup_defaultShape;
251
+ }
252
+ get MatterState() {
253
+ this.ensureWiredUp();
254
+ return this._MatterState;
255
+ }
256
+ get MatterState_solid() {
257
+ this.ensureWiredUp();
258
+ return this._MatterState_solid;
259
+ }
260
+ get MatterState_liquid() {
261
+ this.ensureWiredUp();
262
+ return this._MatterState_liquid;
263
+ }
264
+ get MatterState_gas() {
265
+ this.ensureWiredUp();
266
+ return this._MatterState_gas;
267
+ }
268
+ get Time() {
269
+ this.ensureWiredUp();
270
+ return this._Time;
271
+ }
272
+ ensureWiredUp() {
273
+ if (this._wiredUp) {
274
+ return;
275
+ }
276
+ this._language.havingEntities(this._Circle, this._Coord, this._Geometry, this._IShape, this._Line, this._OffsetDuplicate, this._Shape, this._CompositeShape, this._ReferenceGeometry, this._Documentation, this._BillOfMaterials, this._MaterialGroup, this._MatterState, this._Time);
277
+ this._Circle.extends = this._Shape;
278
+ this._Circle.havingFeatures(this._Circle_r, this._Circle_center);
279
+ this._Circle_r.ofType(LionCore_builtinsBase.INSTANCE._Integer);
280
+ this._Circle_center.ofType(this._Coord);
281
+ this._Coord.havingFeatures(this._Coord_x, this._Coord_y, this._Coord_z);
282
+ this._Coord_x.ofType(LionCore_builtinsBase.INSTANCE._Integer);
283
+ this._Coord_y.ofType(LionCore_builtinsBase.INSTANCE._Integer);
284
+ this._Coord_z.ofType(LionCore_builtinsBase.INSTANCE._Integer);
285
+ this._Geometry.havingFeatures(this._Geometry_shapes, this._Geometry_documentation);
286
+ this._Geometry_shapes.ofType(this._IShape);
287
+ this._Geometry_documentation.ofType(this._Documentation);
288
+ this._IShape.havingFeatures(this._IShape_uuid, this._IShape_fixpoints);
289
+ this._IShape_uuid.ofType(LionCore_builtinsBase.INSTANCE._String);
290
+ this._IShape_fixpoints.ofType(this._Coord);
291
+ this._Line.extends = this._Shape;
292
+ this._Line.implementing(LionCore_builtinsBase.INSTANCE._INamed);
293
+ this._Line.havingFeatures(this._Line_start, this._Line_end);
294
+ this._Line_start.ofType(this._Coord);
295
+ this._Line_end.ofType(this._Coord);
296
+ this._OffsetDuplicate.extends = this._Shape;
297
+ this._OffsetDuplicate.havingFeatures(this._OffsetDuplicate_offset, this._OffsetDuplicate_source, this._OffsetDuplicate_altSource, this._OffsetDuplicate_docs, this._OffsetDuplicate_secretDocs);
298
+ this._OffsetDuplicate_offset.ofType(this._Coord);
299
+ this._OffsetDuplicate_source.ofType(this._Shape);
300
+ this._OffsetDuplicate_altSource.ofType(this._Shape);
301
+ this._OffsetDuplicate_docs.ofType(this._Documentation);
302
+ this._OffsetDuplicate_secretDocs.ofType(this._Documentation);
303
+ this._Shape.implementing(LionCore_builtinsBase.INSTANCE._INamed, this._IShape);
304
+ this._Shape.havingFeatures(this._Shape_shapeDocs);
305
+ this._Shape_shapeDocs.ofType(this._Documentation);
306
+ this._CompositeShape.extends = this._Shape;
307
+ this._CompositeShape.havingFeatures(this._CompositeShape_parts, this._CompositeShape_disabledParts, this._CompositeShape_evilPart);
308
+ this._CompositeShape_parts.ofType(this._IShape);
309
+ this._CompositeShape_disabledParts.ofType(this._IShape);
310
+ this._CompositeShape_evilPart.ofType(this._IShape);
311
+ this._ReferenceGeometry.havingFeatures(this._ReferenceGeometry_shapes);
312
+ this._ReferenceGeometry_shapes.ofType(this._IShape);
313
+ this._Documentation.havingFeatures(this._Documentation_text, this._Documentation_technical);
314
+ this._Documentation_text.ofType(LionCore_builtinsBase.INSTANCE._String).isOptional();
315
+ this._Documentation_technical.ofType(LionCore_builtinsBase.INSTANCE._Boolean).isOptional();
316
+ this._BillOfMaterials.havingFeatures(this._BillOfMaterials_materials, this._BillOfMaterials_groups, this._BillOfMaterials_altGroups, this._BillOfMaterials_defaultGroup);
317
+ this._BillOfMaterials_materials.ofType(this._IShape);
318
+ this._BillOfMaterials_groups.ofType(this._MaterialGroup);
319
+ this._BillOfMaterials_altGroups.ofType(this._MaterialGroup);
320
+ this._BillOfMaterials_defaultGroup.ofType(this._MaterialGroup);
321
+ this._MaterialGroup.havingFeatures(this._MaterialGroup_matterState, this._MaterialGroup_materials, this._MaterialGroup_defaultShape);
322
+ this._MaterialGroup_matterState.ofType(this._MatterState).isOptional();
323
+ this._MaterialGroup_materials.ofType(this._IShape);
324
+ this._MaterialGroup_defaultShape.ofType(this._IShape);
325
+ this._MatterState.havingLiterals(this._MatterState_solid, this._MatterState_liquid, this._MatterState_gas);
326
+ this._wiredUp = true;
327
+ }
328
+ factory(handleDelta) {
329
+ return (classifier, id) => {
330
+ switch (classifier.key) {
331
+ case this._Circle.key: return Circle.create(id, handleDelta);
332
+ case this._Coord.key: return Coord.create(id, handleDelta);
333
+ case this._Geometry.key: return Geometry.create(id, handleDelta);
334
+ case this._Line.key: return Line.create(id, handleDelta);
335
+ case this._OffsetDuplicate.key: return OffsetDuplicate.create(id, handleDelta);
336
+ case this._CompositeShape.key: return CompositeShape.create(id, handleDelta);
337
+ case this._ReferenceGeometry.key: return ReferenceGeometry.create(id, handleDelta);
338
+ case this._Documentation.key: return Documentation.create(id, handleDelta);
339
+ case this._BillOfMaterials.key: return BillOfMaterials.create(id, handleDelta);
340
+ case this._MaterialGroup.key: return MaterialGroup.create(id, handleDelta);
341
+ default: {
342
+ const { language } = classifier;
343
+ throw new Error(`can't instantiate ${classifier.name} (key=${classifier.key}): classifier is not known in language ${language.name} (key=${language.key}, version=${language.version})`);
344
+ }
345
+ }
346
+ };
347
+ }
348
+ enumLiteralFrom(enumerationLiteral) {
349
+ const { enumeration } = enumerationLiteral;
350
+ if (enumeration.key === this._MatterState.key) {
351
+ return enumerationLiteral.key;
352
+ }
353
+ const { language } = enumeration;
354
+ throw new Error(`enumeration with key ${enumeration.key} is not known in language ${language.name} (key=${language.key}, version=${language.version})`);
355
+ }
356
+ }
357
+ ShapesBase.INSTANCE = new ShapesBase();
358
+ export class Shape extends NodeBase {
359
+ get shapeDocs() {
360
+ return this._shapeDocs.get();
361
+ }
362
+ set shapeDocs(newValue) {
363
+ this._shapeDocs.set(newValue);
364
+ }
365
+ replaceShapeDocsWith(newValue) {
366
+ this._shapeDocs.replaceWith(newValue);
367
+ }
368
+ get name() {
369
+ return this._name.get();
370
+ }
371
+ set name(newValue) {
372
+ this._name.set(newValue);
373
+ }
374
+ get uuid() {
375
+ return this._uuid.get();
376
+ }
377
+ set uuid(newValue) {
378
+ this._uuid.set(newValue);
379
+ }
380
+ get fixpoints() {
381
+ return this._fixpoints.get();
382
+ }
383
+ addFixpoints(newValue) {
384
+ this._fixpoints.add(newValue);
385
+ }
386
+ removeFixpoints(valueToRemove) {
387
+ this._fixpoints.remove(valueToRemove);
388
+ }
389
+ addFixpointsAtIndex(newValue, index) {
390
+ this._fixpoints.insertAtIndex(newValue, index);
391
+ }
392
+ moveFixpoints(oldIndex, newIndex) {
393
+ this._fixpoints.move(oldIndex, newIndex);
394
+ }
395
+ replaceFixpointsAtIndex(movedChild, newIndex) {
396
+ this._fixpoints.replaceAtIndex(movedChild, newIndex);
397
+ }
398
+ constructor(classifier, id, handleDelta, parentInfo) {
399
+ super(classifier, id, handleDelta, parentInfo);
400
+ this._shapeDocs = new OptionalSingleContainmentValueManager(ShapesBase.INSTANCE.Shape_shapeDocs, this);
401
+ this._name = new RequiredPropertyValueManager(LionCore_builtinsBase.INSTANCE.INamed_name, this);
402
+ this._uuid = new RequiredPropertyValueManager(ShapesBase.INSTANCE.IShape_uuid, this);
403
+ this._fixpoints = new OptionalMultiContainmentValueManager(ShapesBase.INSTANCE.IShape_fixpoints, this);
404
+ }
405
+ getPropertyValueManager(property) {
406
+ switch (property.key) {
407
+ case LionCore_builtinsBase.INSTANCE.INamed_name.key: return this._name;
408
+ case ShapesBase.INSTANCE.IShape_uuid.key: return this._uuid;
409
+ default: return super.getPropertyValueManager(property);
410
+ }
411
+ }
412
+ getContainmentValueManager(containment) {
413
+ switch (containment.key) {
414
+ case ShapesBase.INSTANCE.Shape_shapeDocs.key: return this._shapeDocs;
415
+ case ShapesBase.INSTANCE.IShape_fixpoints.key: return this._fixpoints;
416
+ default: return super.getContainmentValueManager(containment);
417
+ }
418
+ }
419
+ }
420
+ export class Circle extends Shape {
421
+ static create(id, handleDelta, parentInfo) {
422
+ return new Circle(ShapesBase.INSTANCE.Circle, id, handleDelta, parentInfo);
423
+ }
424
+ get r() {
425
+ return this._r.get();
426
+ }
427
+ set r(newValue) {
428
+ this._r.set(newValue);
429
+ }
430
+ get center() {
431
+ return this._center.get();
432
+ }
433
+ set center(newValue) {
434
+ this._center.set(newValue);
435
+ }
436
+ replaceCenterWith(newValue) {
437
+ this._center.replaceWith(newValue);
438
+ }
439
+ constructor(classifier, id, handleDelta, parentInfo) {
440
+ super(classifier, id, handleDelta, parentInfo);
441
+ this._r = new RequiredPropertyValueManager(ShapesBase.INSTANCE.Circle_r, this);
442
+ this._center = new RequiredSingleContainmentValueManager(ShapesBase.INSTANCE.Circle_center, this);
443
+ }
444
+ getPropertyValueManager(property) {
445
+ if (property.key === ShapesBase.INSTANCE.Circle_r.key) {
446
+ return this._r;
447
+ }
448
+ return super.getPropertyValueManager(property);
449
+ }
450
+ getContainmentValueManager(containment) {
451
+ if (containment.key === ShapesBase.INSTANCE.Circle_center.key) {
452
+ return this._center;
453
+ }
454
+ return super.getContainmentValueManager(containment);
455
+ }
456
+ }
457
+ export class Coord extends NodeBase {
458
+ static create(id, handleDelta, parentInfo) {
459
+ return new Coord(ShapesBase.INSTANCE.Coord, id, handleDelta, parentInfo);
460
+ }
461
+ get x() {
462
+ return this._x.get();
463
+ }
464
+ set x(newValue) {
465
+ this._x.set(newValue);
466
+ }
467
+ get y() {
468
+ return this._y.get();
469
+ }
470
+ set y(newValue) {
471
+ this._y.set(newValue);
472
+ }
473
+ get z() {
474
+ return this._z.get();
475
+ }
476
+ set z(newValue) {
477
+ this._z.set(newValue);
478
+ }
479
+ constructor(classifier, id, handleDelta, parentInfo) {
480
+ super(classifier, id, handleDelta, parentInfo);
481
+ this._x = new RequiredPropertyValueManager(ShapesBase.INSTANCE.Coord_x, this);
482
+ this._y = new RequiredPropertyValueManager(ShapesBase.INSTANCE.Coord_y, this);
483
+ this._z = new RequiredPropertyValueManager(ShapesBase.INSTANCE.Coord_z, this);
484
+ }
485
+ getPropertyValueManager(property) {
486
+ switch (property.key) {
487
+ case ShapesBase.INSTANCE.Coord_x.key: return this._x;
488
+ case ShapesBase.INSTANCE.Coord_y.key: return this._y;
489
+ case ShapesBase.INSTANCE.Coord_z.key: return this._z;
490
+ default: return super.getPropertyValueManager(property);
491
+ }
492
+ }
493
+ }
494
+ export class Geometry extends NodeBase {
495
+ static create(id, handleDelta, parentInfo) {
496
+ return new Geometry(ShapesBase.INSTANCE.Geometry, id, handleDelta, parentInfo);
497
+ }
498
+ get shapes() {
499
+ return this._shapes.get();
500
+ }
501
+ addShapes(newValue) {
502
+ this._shapes.add(newValue);
503
+ }
504
+ removeShapes(valueToRemove) {
505
+ this._shapes.remove(valueToRemove);
506
+ }
507
+ addShapesAtIndex(newValue, index) {
508
+ this._shapes.insertAtIndex(newValue, index);
509
+ }
510
+ moveShapes(oldIndex, newIndex) {
511
+ this._shapes.move(oldIndex, newIndex);
512
+ }
513
+ replaceShapesAtIndex(movedChild, newIndex) {
514
+ this._shapes.replaceAtIndex(movedChild, newIndex);
515
+ }
516
+ get documentation() {
517
+ return this._documentation.get();
518
+ }
519
+ set documentation(newValue) {
520
+ this._documentation.set(newValue);
521
+ }
522
+ replaceDocumentationWith(newValue) {
523
+ this._documentation.replaceWith(newValue);
524
+ }
525
+ constructor(classifier, id, handleDelta, parentInfo) {
526
+ super(classifier, id, handleDelta, parentInfo);
527
+ this._shapes = new OptionalMultiContainmentValueManager(ShapesBase.INSTANCE.Geometry_shapes, this);
528
+ this._documentation = new OptionalSingleContainmentValueManager(ShapesBase.INSTANCE.Geometry_documentation, this);
529
+ }
530
+ getContainmentValueManager(containment) {
531
+ switch (containment.key) {
532
+ case ShapesBase.INSTANCE.Geometry_shapes.key: return this._shapes;
533
+ case ShapesBase.INSTANCE.Geometry_documentation.key: return this._documentation;
534
+ default: return super.getContainmentValueManager(containment);
535
+ }
536
+ }
537
+ }
538
+ export class Line extends Shape {
539
+ static create(id, handleDelta, parentInfo) {
540
+ return new Line(ShapesBase.INSTANCE.Line, id, handleDelta, parentInfo);
541
+ }
542
+ get start() {
543
+ return this._start.get();
544
+ }
545
+ set start(newValue) {
546
+ this._start.set(newValue);
547
+ }
548
+ replaceStartWith(newValue) {
549
+ this._start.replaceWith(newValue);
550
+ }
551
+ get end() {
552
+ return this._end.get();
553
+ }
554
+ set end(newValue) {
555
+ this._end.set(newValue);
556
+ }
557
+ replaceEndWith(newValue) {
558
+ this._end.replaceWith(newValue);
559
+ }
560
+ constructor(classifier, id, handleDelta, parentInfo) {
561
+ super(classifier, id, handleDelta, parentInfo);
562
+ this._start = new RequiredSingleContainmentValueManager(ShapesBase.INSTANCE.Line_start, this);
563
+ this._end = new RequiredSingleContainmentValueManager(ShapesBase.INSTANCE.Line_end, this);
564
+ }
565
+ getContainmentValueManager(containment) {
566
+ switch (containment.key) {
567
+ case ShapesBase.INSTANCE.Line_start.key: return this._start;
568
+ case ShapesBase.INSTANCE.Line_end.key: return this._end;
569
+ default: return super.getContainmentValueManager(containment);
570
+ }
571
+ }
572
+ }
573
+ export class OffsetDuplicate extends Shape {
574
+ static create(id, handleDelta, parentInfo) {
575
+ return new OffsetDuplicate(ShapesBase.INSTANCE.OffsetDuplicate, id, handleDelta, parentInfo);
576
+ }
577
+ get offset() {
578
+ return this._offset.get();
579
+ }
580
+ set offset(newValue) {
581
+ this._offset.set(newValue);
582
+ }
583
+ replaceOffsetWith(newValue) {
584
+ this._offset.replaceWith(newValue);
585
+ }
586
+ get source() {
587
+ return this._source.get();
588
+ }
589
+ set source(newValue) {
590
+ this._source.set(newValue);
591
+ }
592
+ get altSource() {
593
+ return this._altSource.get();
594
+ }
595
+ set altSource(newValue) {
596
+ this._altSource.set(newValue);
597
+ }
598
+ get docs() {
599
+ return this._docs.get();
600
+ }
601
+ set docs(newValue) {
602
+ this._docs.set(newValue);
603
+ }
604
+ replaceDocsWith(newValue) {
605
+ this._docs.replaceWith(newValue);
606
+ }
607
+ get secretDocs() {
608
+ return this._secretDocs.get();
609
+ }
610
+ set secretDocs(newValue) {
611
+ this._secretDocs.set(newValue);
612
+ }
613
+ replaceSecretDocsWith(newValue) {
614
+ this._secretDocs.replaceWith(newValue);
615
+ }
616
+ constructor(classifier, id, handleDelta, parentInfo) {
617
+ super(classifier, id, handleDelta, parentInfo);
618
+ this._offset = new RequiredSingleContainmentValueManager(ShapesBase.INSTANCE.OffsetDuplicate_offset, this);
619
+ this._source = new RequiredSingleReferenceValueManager(ShapesBase.INSTANCE.OffsetDuplicate_source, this);
620
+ this._altSource = new OptionalSingleReferenceValueManager(ShapesBase.INSTANCE.OffsetDuplicate_altSource, this);
621
+ this._docs = new OptionalSingleContainmentValueManager(ShapesBase.INSTANCE.OffsetDuplicate_docs, this);
622
+ this._secretDocs = new OptionalSingleContainmentValueManager(ShapesBase.INSTANCE.OffsetDuplicate_secretDocs, this);
623
+ }
624
+ getContainmentValueManager(containment) {
625
+ switch (containment.key) {
626
+ case ShapesBase.INSTANCE.OffsetDuplicate_offset.key: return this._offset;
627
+ case ShapesBase.INSTANCE.OffsetDuplicate_docs.key: return this._docs;
628
+ case ShapesBase.INSTANCE.OffsetDuplicate_secretDocs.key: return this._secretDocs;
629
+ default: return super.getContainmentValueManager(containment);
630
+ }
631
+ }
632
+ getReferenceValueManager(reference) {
633
+ switch (reference.key) {
634
+ case ShapesBase.INSTANCE.OffsetDuplicate_source.key: return this._source;
635
+ case ShapesBase.INSTANCE.OffsetDuplicate_altSource.key: return this._altSource;
636
+ default: return super.getReferenceValueManager(reference);
637
+ }
638
+ }
639
+ }
640
+ export class CompositeShape extends Shape {
641
+ static create(id, handleDelta, parentInfo) {
642
+ return new CompositeShape(ShapesBase.INSTANCE.CompositeShape, id, handleDelta, parentInfo);
643
+ }
644
+ get parts() {
645
+ return this._parts.get();
646
+ }
647
+ addParts(newValue) {
648
+ this._parts.add(newValue);
649
+ }
650
+ removeParts(valueToRemove) {
651
+ this._parts.remove(valueToRemove);
652
+ }
653
+ addPartsAtIndex(newValue, index) {
654
+ this._parts.insertAtIndex(newValue, index);
655
+ }
656
+ moveParts(oldIndex, newIndex) {
657
+ this._parts.move(oldIndex, newIndex);
658
+ }
659
+ replacePartsAtIndex(movedChild, newIndex) {
660
+ this._parts.replaceAtIndex(movedChild, newIndex);
661
+ }
662
+ get disabledParts() {
663
+ return this._disabledParts.get();
664
+ }
665
+ addDisabledParts(newValue) {
666
+ this._disabledParts.add(newValue);
667
+ }
668
+ removeDisabledParts(valueToRemove) {
669
+ this._disabledParts.remove(valueToRemove);
670
+ }
671
+ addDisabledPartsAtIndex(newValue, index) {
672
+ this._disabledParts.insertAtIndex(newValue, index);
673
+ }
674
+ moveDisabledParts(oldIndex, newIndex) {
675
+ this._disabledParts.move(oldIndex, newIndex);
676
+ }
677
+ replaceDisabledPartsAtIndex(movedChild, newIndex) {
678
+ this._disabledParts.replaceAtIndex(movedChild, newIndex);
679
+ }
680
+ get evilPart() {
681
+ return this._evilPart.get();
682
+ }
683
+ set evilPart(newValue) {
684
+ this._evilPart.set(newValue);
685
+ }
686
+ replaceEvilPartWith(newValue) {
687
+ this._evilPart.replaceWith(newValue);
688
+ }
689
+ constructor(classifier, id, handleDelta, parentInfo) {
690
+ super(classifier, id, handleDelta, parentInfo);
691
+ this._parts = new RequiredMultiContainmentValueManager(ShapesBase.INSTANCE.CompositeShape_parts, this);
692
+ this._disabledParts = new RequiredMultiContainmentValueManager(ShapesBase.INSTANCE.CompositeShape_disabledParts, this);
693
+ this._evilPart = new RequiredSingleContainmentValueManager(ShapesBase.INSTANCE.CompositeShape_evilPart, this);
694
+ }
695
+ getContainmentValueManager(containment) {
696
+ switch (containment.key) {
697
+ case ShapesBase.INSTANCE.CompositeShape_parts.key: return this._parts;
698
+ case ShapesBase.INSTANCE.CompositeShape_disabledParts.key: return this._disabledParts;
699
+ case ShapesBase.INSTANCE.CompositeShape_evilPart.key: return this._evilPart;
700
+ default: return super.getContainmentValueManager(containment);
701
+ }
702
+ }
703
+ }
704
+ export class ReferenceGeometry extends NodeBase {
705
+ static create(id, handleDelta, parentInfo) {
706
+ return new ReferenceGeometry(ShapesBase.INSTANCE.ReferenceGeometry, id, handleDelta, parentInfo);
707
+ }
708
+ get shapes() {
709
+ return this._shapes.get();
710
+ }
711
+ addShapes(newValue) {
712
+ this._shapes.add(newValue);
713
+ }
714
+ removeShapes(valueToRemove) {
715
+ this._shapes.remove(valueToRemove);
716
+ }
717
+ addShapesAtIndex(newValue, index) {
718
+ this._shapes.insertAtIndex(newValue, index);
719
+ }
720
+ moveShapes(oldIndex, newIndex) {
721
+ this._shapes.move(oldIndex, newIndex);
722
+ }
723
+ constructor(classifier, id, handleDelta, parentInfo) {
724
+ super(classifier, id, handleDelta, parentInfo);
725
+ this._shapes = new OptionalMultiReferenceValueManager(ShapesBase.INSTANCE.ReferenceGeometry_shapes, this);
726
+ }
727
+ getReferenceValueManager(reference) {
728
+ if (reference.key === ShapesBase.INSTANCE.ReferenceGeometry_shapes.key) {
729
+ return this._shapes;
730
+ }
731
+ return super.getReferenceValueManager(reference);
732
+ }
733
+ }
734
+ export class Documentation extends NodeBase {
735
+ static create(id, handleDelta, parentInfo) {
736
+ return new Documentation(ShapesBase.INSTANCE.Documentation, id, handleDelta, parentInfo);
737
+ }
738
+ get text() {
739
+ return this._text.get();
740
+ }
741
+ set text(newValue) {
742
+ this._text.set(newValue);
743
+ }
744
+ get technical() {
745
+ return this._technical.get();
746
+ }
747
+ set technical(newValue) {
748
+ this._technical.set(newValue);
749
+ }
750
+ constructor(classifier, id, handleDelta, parentInfo) {
751
+ super(classifier, id, handleDelta, parentInfo);
752
+ this._text = new OptionalPropertyValueManager(ShapesBase.INSTANCE.Documentation_text, this);
753
+ this._technical = new OptionalPropertyValueManager(ShapesBase.INSTANCE.Documentation_technical, this);
754
+ }
755
+ getPropertyValueManager(property) {
756
+ switch (property.key) {
757
+ case ShapesBase.INSTANCE.Documentation_text.key: return this._text;
758
+ case ShapesBase.INSTANCE.Documentation_technical.key: return this._technical;
759
+ default: return super.getPropertyValueManager(property);
760
+ }
761
+ }
762
+ }
763
+ export class BillOfMaterials extends NodeBase {
764
+ static create(id, handleDelta, parentInfo) {
765
+ return new BillOfMaterials(ShapesBase.INSTANCE.BillOfMaterials, id, handleDelta, parentInfo);
766
+ }
767
+ get materials() {
768
+ return this._materials.get();
769
+ }
770
+ addMaterials(newValue) {
771
+ this._materials.add(newValue);
772
+ }
773
+ removeMaterials(valueToRemove) {
774
+ this._materials.remove(valueToRemove);
775
+ }
776
+ addMaterialsAtIndex(newValue, index) {
777
+ this._materials.insertAtIndex(newValue, index);
778
+ }
779
+ moveMaterials(oldIndex, newIndex) {
780
+ this._materials.move(oldIndex, newIndex);
781
+ }
782
+ get groups() {
783
+ return this._groups.get();
784
+ }
785
+ addGroups(newValue) {
786
+ this._groups.add(newValue);
787
+ }
788
+ removeGroups(valueToRemove) {
789
+ this._groups.remove(valueToRemove);
790
+ }
791
+ addGroupsAtIndex(newValue, index) {
792
+ this._groups.insertAtIndex(newValue, index);
793
+ }
794
+ moveGroups(oldIndex, newIndex) {
795
+ this._groups.move(oldIndex, newIndex);
796
+ }
797
+ replaceGroupsAtIndex(movedChild, newIndex) {
798
+ this._groups.replaceAtIndex(movedChild, newIndex);
799
+ }
800
+ get altGroups() {
801
+ return this._altGroups.get();
802
+ }
803
+ addAltGroups(newValue) {
804
+ this._altGroups.add(newValue);
805
+ }
806
+ removeAltGroups(valueToRemove) {
807
+ this._altGroups.remove(valueToRemove);
808
+ }
809
+ addAltGroupsAtIndex(newValue, index) {
810
+ this._altGroups.insertAtIndex(newValue, index);
811
+ }
812
+ moveAltGroups(oldIndex, newIndex) {
813
+ this._altGroups.move(oldIndex, newIndex);
814
+ }
815
+ replaceAltGroupsAtIndex(movedChild, newIndex) {
816
+ this._altGroups.replaceAtIndex(movedChild, newIndex);
817
+ }
818
+ get defaultGroup() {
819
+ return this._defaultGroup.get();
820
+ }
821
+ set defaultGroup(newValue) {
822
+ this._defaultGroup.set(newValue);
823
+ }
824
+ replaceDefaultGroupWith(newValue) {
825
+ this._defaultGroup.replaceWith(newValue);
826
+ }
827
+ constructor(classifier, id, handleDelta, parentInfo) {
828
+ super(classifier, id, handleDelta, parentInfo);
829
+ this._materials = new OptionalMultiReferenceValueManager(ShapesBase.INSTANCE.BillOfMaterials_materials, this);
830
+ this._groups = new OptionalMultiContainmentValueManager(ShapesBase.INSTANCE.BillOfMaterials_groups, this);
831
+ this._altGroups = new OptionalMultiContainmentValueManager(ShapesBase.INSTANCE.BillOfMaterials_altGroups, this);
832
+ this._defaultGroup = new OptionalSingleContainmentValueManager(ShapesBase.INSTANCE.BillOfMaterials_defaultGroup, this);
833
+ }
834
+ getContainmentValueManager(containment) {
835
+ switch (containment.key) {
836
+ case ShapesBase.INSTANCE.BillOfMaterials_groups.key: return this._groups;
837
+ case ShapesBase.INSTANCE.BillOfMaterials_altGroups.key: return this._altGroups;
838
+ case ShapesBase.INSTANCE.BillOfMaterials_defaultGroup.key: return this._defaultGroup;
839
+ default: return super.getContainmentValueManager(containment);
840
+ }
841
+ }
842
+ getReferenceValueManager(reference) {
843
+ if (reference.key === ShapesBase.INSTANCE.BillOfMaterials_materials.key) {
844
+ return this._materials;
845
+ }
846
+ return super.getReferenceValueManager(reference);
847
+ }
848
+ }
849
+ export class MaterialGroup extends NodeBase {
850
+ static create(id, handleDelta, parentInfo) {
851
+ return new MaterialGroup(ShapesBase.INSTANCE.MaterialGroup, id, handleDelta, parentInfo);
852
+ }
853
+ get matterState() {
854
+ return this._matterState.get();
855
+ }
856
+ set matterState(newValue) {
857
+ this._matterState.set(newValue);
858
+ }
859
+ get materials() {
860
+ return this._materials.get();
861
+ }
862
+ addMaterials(newValue) {
863
+ this._materials.add(newValue);
864
+ }
865
+ removeMaterials(valueToRemove) {
866
+ this._materials.remove(valueToRemove);
867
+ }
868
+ addMaterialsAtIndex(newValue, index) {
869
+ this._materials.insertAtIndex(newValue, index);
870
+ }
871
+ moveMaterials(oldIndex, newIndex) {
872
+ this._materials.move(oldIndex, newIndex);
873
+ }
874
+ get defaultShape() {
875
+ return this._defaultShape.get();
876
+ }
877
+ set defaultShape(newValue) {
878
+ this._defaultShape.set(newValue);
879
+ }
880
+ replaceDefaultShapeWith(newValue) {
881
+ this._defaultShape.replaceWith(newValue);
882
+ }
883
+ constructor(classifier, id, handleDelta, parentInfo) {
884
+ super(classifier, id, handleDelta, parentInfo);
885
+ this._matterState = new OptionalPropertyValueManager(ShapesBase.INSTANCE.MaterialGroup_matterState, this);
886
+ this._materials = new RequiredMultiReferenceValueManager(ShapesBase.INSTANCE.MaterialGroup_materials, this);
887
+ this._defaultShape = new OptionalSingleContainmentValueManager(ShapesBase.INSTANCE.MaterialGroup_defaultShape, this);
888
+ }
889
+ getPropertyValueManager(property) {
890
+ if (property.key === ShapesBase.INSTANCE.MaterialGroup_matterState.key) {
891
+ return this._matterState;
892
+ }
893
+ return super.getPropertyValueManager(property);
894
+ }
895
+ getContainmentValueManager(containment) {
896
+ if (containment.key === ShapesBase.INSTANCE.MaterialGroup_defaultShape.key) {
897
+ return this._defaultShape;
898
+ }
899
+ return super.getContainmentValueManager(containment);
900
+ }
901
+ getReferenceValueManager(reference) {
902
+ if (reference.key === ShapesBase.INSTANCE.MaterialGroup_materials.key) {
903
+ return this._materials;
904
+ }
905
+ return super.getReferenceValueManager(reference);
906
+ }
907
+ }
908
+ export var MatterState;
909
+ (function (MatterState) {
910
+ MatterState["solid"] = "key-solid";
911
+ MatterState["liquid"] = "key-liquid";
912
+ MatterState["gas"] = "key-gas";
913
+ })(MatterState || (MatterState = {}));
914
+ //# sourceMappingURL=Shapes.g.js.map