/******************************************************************************* | |
* Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Gabor Bergmann - initial API and implementation | |
*******************************************************************************/ | |
package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters; | |
import org.eclipse.viatra2.framework.IFramework; | |
import org.eclipse.viatra2.gtasm.patternmatcher.incremental.EngineManager; | |
import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IPredicateTraceListener; | |
import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine; | |
import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern; | |
/** | |
* @author Bergmann Gábor | |
* | |
*/ | |
public class VPMGTASMContext extends VPMContext<GTPattern> { | |
/** | |
* @param framework | |
*/ | |
public VPMGTASMContext(IFramework framework) { | |
super(framework); | |
} | |
public void reportPatternDependency(GTPattern gtPattern) { | |
EngineManager.getInstance().getMachineListener(framework.get()).registerPattern(gtPattern); | |
} | |
/* (non-Javadoc) | |
* @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.IPatternMatcherRuntimeContext#subscribePatternMatcherForTraceInfluences(org.eclipse.viatra2.gtasm.patternmatcher.incremental.ReteEngine) | |
*/ | |
public IPredicateTraceListener subscribePatternMatcherForTraceInfluences(ReteEngine<GTPattern> engine) { | |
return new ASMFunctionListener(engine); | |
} | |
} |