/** */ package fr.inria.diverse.iot2.iot2.iot2.impl; import fr.inria.diverse.iot2.iot2.iot2.IntegerExpression; import fr.inria.diverse.iot2.iot2.iot2.IntegerVariable; import fr.inria.diverse.iot2.iot2.iot2.Iot2Package; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Integer Expression</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link fr.inria.diverse.iot2.iot2.iot2.impl.IntegerExpressionImpl#getOperand2 <em>Operand2</em>}</li> * <li>{@link fr.inria.diverse.iot2.iot2.iot2.impl.IntegerExpressionImpl#getOperand1 <em>Operand1</em>}</li> * </ul> * * @generated */ public abstract class IntegerExpressionImpl extends ExpressionImpl implements IntegerExpression { /** * The cached value of the '{@link #getOperand2() <em>Operand2</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOperand2() * @generated * @ordered */ protected IntegerVariable operand2; /** * The cached value of the '{@link #getOperand1() <em>Operand1</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOperand1() * @generated * @ordered */ protected IntegerVariable operand1; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IntegerExpressionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return Iot2Package.Literals.INTEGER_EXPRESSION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IntegerVariable getOperand2() { if (operand2 != null && operand2.eIsProxy()) { InternalEObject oldOperand2 = (InternalEObject)operand2; operand2 = (IntegerVariable)eResolveProxy(oldOperand2); if (operand2 != oldOperand2) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iot2Package.INTEGER_EXPRESSION__OPERAND2, oldOperand2, operand2)); } } return operand2; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IntegerVariable basicGetOperand2() { return operand2; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOperand2(IntegerVariable newOperand2) { IntegerVariable oldOperand2 = operand2; operand2 = newOperand2; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Iot2Package.INTEGER_EXPRESSION__OPERAND2, oldOperand2, operand2)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IntegerVariable getOperand1() { if (operand1 != null && operand1.eIsProxy()) { InternalEObject oldOperand1 = (InternalEObject)operand1; operand1 = (IntegerVariable)eResolveProxy(oldOperand1); if (operand1 != oldOperand1) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iot2Package.INTEGER_EXPRESSION__OPERAND1, oldOperand1, operand1)); } } return operand1; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IntegerVariable basicGetOperand1() { return operand1; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOperand1(IntegerVariable newOperand1) { IntegerVariable oldOperand1 = operand1; operand1 = newOperand1; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Iot2Package.INTEGER_EXPRESSION__OPERAND1, oldOperand1, operand1)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Iot2Package.INTEGER_EXPRESSION__OPERAND2: if (resolve) return getOperand2(); return basicGetOperand2(); case Iot2Package.INTEGER_EXPRESSION__OPERAND1: if (resolve) return getOperand1(); return basicGetOperand1(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Iot2Package.INTEGER_EXPRESSION__OPERAND2: setOperand2((IntegerVariable)newValue); return; case Iot2Package.INTEGER_EXPRESSION__OPERAND1: setOperand1((IntegerVariable)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Iot2Package.INTEGER_EXPRESSION__OPERAND2: setOperand2((IntegerVariable)null); return; case Iot2Package.INTEGER_EXPRESSION__OPERAND1: setOperand1((IntegerVariable)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Iot2Package.INTEGER_EXPRESSION__OPERAND2: return operand2 != null; case Iot2Package.INTEGER_EXPRESSION__OPERAND1: return operand1 != null; } return super.eIsSet(featureID); } } //IntegerExpressionImpl