blob: ed2884e7dbbbd7ee6f885fa76dadfac47cc3779c [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;
/**
* A PatternSignature identifies the run-time settings of
* a given (interface) variable. Settings include (i) a
* parameter mode (INPUT/OUTPUT), which defines whether
* the variable has been fixed by the caller, (ii) an
* execution mode, which specifies the cardinality of values
* (SINGLE_RESULT/MULTIPLE_RESULTS) to which the variable
* must be fixed, and (iii) a parameter scope (IN/BELOW).
*/
public class PatternCallSignature {
private ParameterMode parameterMode;
private ExecutionMode executionMode;
private Scope parameterScope;
public ParameterMode getParameterMode() {
return parameterMode;
}
public ExecutionMode getExecutionMode() {
return executionMode;
}
public Scope getParameterScope() {
return parameterScope;
}
public void setParameterScope(Scope parameterScope) {
this.parameterScope = parameterScope;
}
public void setExecutionMode(ExecutionMode executionMode) {
this.executionMode = executionMode;
}
public void setParameterMode(ParameterMode parameterMode) {
this.parameterMode = parameterMode;
}
/** Clones the PatternCallSignature, have to take into consideration that the Scope parameter is not scoped
*
**/
public PatternCallSignature clone()
{
PatternCallSignature clone = new PatternCallSignature();
clone.setParameterMode(parameterMode);
clone.setExecutionMode(executionMode);
clone.setParameterScope(parameterScope);
return clone;
}
}