diff options
Diffstat (limited to 'store/src/main/java/org/eclipse/viatra/solver/data/query/internal/RelationalEngineContext.java')
-rw-r--r-- | store/src/main/java/org/eclipse/viatra/solver/data/query/internal/RelationalEngineContext.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/store/src/main/java/org/eclipse/viatra/solver/data/query/internal/RelationalEngineContext.java b/store/src/main/java/org/eclipse/viatra/solver/data/query/internal/RelationalEngineContext.java new file mode 100644 index 00000000..01948828 --- /dev/null +++ b/store/src/main/java/org/eclipse/viatra/solver/data/query/internal/RelationalEngineContext.java | |||
@@ -0,0 +1,32 @@ | |||
1 | package org.eclipse.viatra.solver.data.query.internal; | ||
2 | |||
3 | import org.eclipse.viatra.query.runtime.api.scope.IBaseIndex; | ||
4 | import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; | ||
5 | import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext; | ||
6 | import org.eclipse.viatra.solver.data.model.Model; | ||
7 | |||
8 | public class RelationalEngineContext implements IEngineContext{ | ||
9 | private final IBaseIndex baseIndex = new DummyBaseIndexer(); | ||
10 | private final RelationalRuntimeContext runtimeContext; | ||
11 | |||
12 | |||
13 | public RelationalEngineContext(Model model, RelationUpdateListener updateListener) { | ||
14 | runtimeContext = new RelationalRuntimeContext(model, updateListener); | ||
15 | } | ||
16 | |||
17 | @Override | ||
18 | public IBaseIndex getBaseIndex() { | ||
19 | return this.baseIndex; | ||
20 | } | ||
21 | |||
22 | @Override | ||
23 | public void dispose() { | ||
24 | //lifecycle not controlled by engine | ||
25 | } | ||
26 | |||
27 | @Override | ||
28 | public IQueryRuntimeContext getQueryRuntimeContext() { | ||
29 | return runtimeContext; | ||
30 | } | ||
31 | |||
32 | } | ||