blob: 7cd202e6f1c55518aed9b2ef121102e09852d79c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Akos Horvath, Gergely Varro 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:
* Akos Horvath, Gergely Varro - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;
import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
public interface ISearchPlanOperation {
/** The pre execution operations are handled
* @param frame The matching frame of the invocation context
* @throws PatternMatcherRuntimeException
*/
public void preprocess(MatchingFrame frame)
throws PatternMatcherRuntimeException;
/** The post execution operations are handled
* @param frame The matching frame of the invocation context
* @throws PatternMatcherRuntimeException
*/
public void postprocess(MatchingFrame frame)
throws PatternMatcherRuntimeException;
/**Executes the search operation
* @param frame The matching frame of the invocation context
* @return true if the execution was successful else false
* @throws PatternMatcherRuntimeException
*/
public boolean execute(MatchingFrame frame)
throws PatternMatcherRuntimeException;
/**Returns the GTASM element from which the operation was created (also which caused the error durng the execution)
* @param frame The matching frame of the invocation context
* @return
*/
public AnnotatedElement getErrorfulElement(MatchingFrame frame);
/**A detailed serialized description of the operation
* @param frame The matching frame of the invocation context
* @return
*/
public String toString(MatchingFrame frame);
}