blob: b6e474c7a01e4383d5d7a7b148d06adb9f59d79e [file] [log] [blame]
/**
* * Copyright (c) 2006-2010 Istvan Rath 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:
* * Istvan Rath, Daniel Varro - initial API and implementation
*
*/
package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;
import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Native Function Invocation</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.NativeFunctionInvocationImpl#getFunctionName <em>Function Name</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class NativeFunctionInvocationImpl extends FunctionInvocationImpl implements NativeFunctionInvocation
{
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Istvan Rath, Daniel Varro - initial API and implementation\r\n";
/**
* The default value of the '{@link #getFunctionName() <em>Function Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFunctionName()
* @generated
* @ordered
*/
protected static final String FUNCTION_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getFunctionName() <em>Function Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFunctionName()
* @generated
* @ordered
*/
protected String functionName = FUNCTION_NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NativeFunctionInvocationImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return TermsPackage.Literals.NATIVE_FUNCTION_INVOCATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getFunctionName()
{
return functionName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setFunctionName(String newFunctionName)
{
String oldFunctionName = functionName;
functionName = newFunctionName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME, oldFunctionName, functionName));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
return getFunctionName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
setFunctionName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
setFunctionName(FUNCTION_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
return FUNCTION_NAME_EDEFAULT == null ? functionName != null : !FUNCTION_NAME_EDEFAULT.equals(functionName);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (functionName: ");
result.append(functionName);
result.append(')');
return result.toString();
}
} //NativeFunctionInvocationImpl