Parcourir la source

Added attribute lower and upper multiplicity to the Classes, which is
now also passed along to the instances (1 level!). Still need to
incorporate it in the conformance check (if present)

Yentl Van Tendeloo il y a 9 ans
Parent
commit
12e361ca94
1 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 14 0
      bootstrap/metamodels.alc

+ 14 - 0
bootstrap/metamodels.alc

@@ -24,6 +24,13 @@ Element function create_metamodels():
 		model_add_edge(scd, "association_name", "Association", "link")
 		model_add_edge(scd, "association_attr", "Association", "String")
 		model_add_edge(scd, "attr_name", "association_attr", "name")
+		model_add_node(scd, "Integer")
+		model_add_value(scd, "lower_multiplicity", "lower_multiplicity")
+		model_add_value(scd, "upper_multiplicity", "upper_multiplicity")
+		model_add_edge(scd, "class_to_lm", "Class", "Integer")
+		model_add_edge(scd, "class_to_um", "Class", "Integer")
+		model_add_edge(scd, "lm_name", "class_to_lm", "lower_multiplicity")
+		model_add_edge(scd, "um_name", "class_to_um", "upper_multiplicity")
 
 		retype_model(scd, scd)
 		define_inheritance(scd, "Inheritance")
@@ -43,6 +50,13 @@ Element function create_metamodels():
 		retype(scd, "association_name", "association_attr")
 		retype(scd, "association_attr", "Association")
 		retype(scd, "attr_name", "association_attr")
+		retype(scd, "Integer", "Type")
+		retype(scd, "lower_multiplicity", "String")
+		retype(scd, "upper_multiplicity", "String")
+		retype(scd, "class_to_lm", "Association")
+		retype(scd, "class_to_um", "Association")
+		retype(scd, "lm_name", "association_attr")
+		retype(scd, "um_name", "association_attr")
 
 		export_node("models/SimpleClassDiagrams", scd)