]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/chr/CHRRuntimeRuleset.java
(refs #7365) Fixed the bug in the test CHR11.scl
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / chr / CHRRuntimeRuleset.java
index 8f6ca3ee9f08ad4c03dde93c895d7070ef621b22..21f3b65ad69f26fdb620f97ed8e77b590ede3fc1 100644 (file)
@@ -1,5 +1,15 @@
 package org.simantics.scl.runtime.chr;
 
 public class CHRRuntimeRuleset {
-
+       int currentId;
+       
+       public void register(CHRContext context) {
+               if(context.currentId < currentId)
+                       context.currentId = currentId;
+       }
+       
+       public void unregister(CHRContext context) {
+               if(context.currentId > currentId)
+                       currentId = context.currentId;
+       }
 }