]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/relations/AbstractRelation.java
54acd32f3f923edc1ef41189d762735dbe77db0d
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / relations / AbstractRelation.java
1 package org.simantics.scl.compiler.elaboration.relations;
2
3 import org.simantics.scl.compiler.elaboration.chr.plan.PlanContext;
4 import org.simantics.scl.compiler.elaboration.expressions.Expression;
5 import org.simantics.scl.compiler.elaboration.expressions.Variable;
6 import org.simantics.scl.compiler.elaboration.query.compilation.EnforcingContext;
7 import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
8 import org.simantics.scl.compiler.types.Type;
9
10 public abstract class AbstractRelation implements SCLRelation {
11
12     @Override
13     public int getPhase() {
14         return 0;
15     }
16
17     @Override
18     public Expression generateEnforce(long location, EnforcingContext context, Type[] typeParameters, Variable[] parameters) {
19         throw new UnsupportedOperationException(getClass().getSimpleName() + " does not support enforce.");
20     }
21     
22     @Override
23     public void generateEnforce(PlanContext context, CodeWriter w, long location, Expression[] parameters) {
24         throw new UnsupportedOperationException(getClass().getSimpleName() + " does not support enforce.");
25     }
26     
27     @Override
28     public void generateIterate(PlanContext context, CodeWriter w, long location, int boundMask, Variable[] variables,
29             Expression[] expressions) {
30         throw new UnsupportedOperationException(getClass().getSimpleName() + " does not support iterate.");
31     }
32 }