|
@@ -84,6 +84,26 @@ Element function allOutgoingAssociationInstances(model : Element, source_name :
|
|
|
return result!
|
|
|
|
|
|
Element function allIncomingAssociationInstances(model : Element, target_name : String, assoc_name : String):
|
|
|
+ // Read out all outgoing edges of the model and select those that are typed by the specified association
|
|
|
+ Element result
|
|
|
+ Element source
|
|
|
+ String option
|
|
|
+ Integer all_out
|
|
|
+ Integer i
|
|
|
+
|
|
|
+ result = create_node()
|
|
|
+ source = model["model"][target_name]
|
|
|
+ all_out = read_nr_in(source)
|
|
|
+ i = 0
|
|
|
+ while (i < all_out):
|
|
|
+ option = reverseKeyLookup(model["model"], read_in(source, i))
|
|
|
+ if (is_nominal_instance(model, option, assoc_name)):
|
|
|
+ set_add(result, option)
|
|
|
+ i = i + 1
|
|
|
+
|
|
|
+ return result!
|
|
|
+
|
|
|
+Element function allIncomingAssociationInstances_slow(model : Element, target_name : String, assoc_name : String):
|
|
|
// Read out all outgoing edges of the model and select those that are typed by the specified association
|
|
|
Element assocs
|
|
|
String assoc
|