ソースを参照

Take into account the name when copying

Yentl Van Tendeloo 8 年 前
コミット
21abf7353d

+ 4 - 0
integration/code/pn_design_to_runtime.mvc

@@ -22,6 +22,10 @@ RAM_PN_DR annotate {
                         Boolean function value(model : Element, name : String, mapping : Element):
                             return True!
                         $
+                    value_name = $
+                        Integer function value(model : Element, name : String, mapping : Element):
+                            return read_attribute(model, mapping["0"], "name")!
+                        $
                 }
                 Post_D2R_TransitionLink (ct1, ct2){
                     label = "2"

+ 4 - 0
integration/code/pn_runtime_to_design.mvc

@@ -18,6 +18,10 @@ RAM_PN_DR annotate {
                 }
                 Post_PetriNets/Transition ct2 {
                     label = "1"
+                    value_name = $
+                        Integer function value(model : Element, name : String, mapping : Element):
+                            return read_attribute(model, mapping["0"], "name")!
+                        $
                 }
                 Post_R2D_TransitionLink (ct1, ct2){
                     label = "2"