X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fchr%2Fplanning%2FPrePlanItem.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fchr%2Fplanning%2FPrePlanItem.java;h=f470cbf7d71faff0b49d0e035aac28466ab5c850;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=bb85900204b42bed829d6fcad56a96e5c841b5b6;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/planning/PrePlanItem.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/planning/PrePlanItem.java index bb8590020..f470cbf7d 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/planning/PrePlanItem.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/planning/PrePlanItem.java @@ -1,31 +1,31 @@ -package org.simantics.scl.compiler.elaboration.chr.planning; - -public abstract class PrePlanItem { - int queuePos; - /* Primary priorities: - * 0 = check - * 1 = functional calculation - * 2 = almost completely bound relation - * 3 = completely inbound relation - */ - public double primaryPriority = Double.POSITIVE_INFINITY; - public int secondaryPriority; - public long location; - - public PrePlanItem(int secondaryPriority) { - this.secondaryPriority = secondaryPriority; - } - - public int compare(PrePlanItem other) { - if(primaryPriority < other.primaryPriority) - return -1; - if(primaryPriority > other.primaryPriority) - return 1; - return Integer.compare(secondaryPriority, other.secondaryPriority); - } - - public abstract void initializeListeners(QueryPlanningContext context); - public abstract void variableSolved(QueryPlanningContext context, int variableId); - - public abstract void generate(QueryPlanningContext context); -} +package org.simantics.scl.compiler.elaboration.chr.planning; + +public abstract class PrePlanItem { + int queuePos; + /* Primary priorities: + * 0 = check + * 1 = functional calculation + * 2 = almost completely bound relation + * 3 = completely inbound relation + */ + public double primaryPriority = Double.POSITIVE_INFINITY; + public int secondaryPriority; + public long location; + + public PrePlanItem(int secondaryPriority) { + this.secondaryPriority = secondaryPriority; + } + + public int compare(PrePlanItem other) { + if(primaryPriority < other.primaryPriority) + return -1; + if(primaryPriority > other.primaryPriority) + return 1; + return Integer.compare(secondaryPriority, other.secondaryPriority); + } + + public abstract void initializeListeners(QueryPlanningContext context); + public abstract void variableSolved(QueryPlanningContext context, int variableId); + + public abstract void generate(QueryPlanningContext context); +}