/** */ package hu.bme.mit.inf.dslreasoner.smtLanguage.impl; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSortedVariable; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTypeReference; import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguagePackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * * An implementation of the model object 'SMT Sorted Variable'. * *

* The following features are implemented: *

*

* * @generated */ public class SMTSortedVariableImpl extends SMTSymbolicDeclarationImpl implements SMTSortedVariable { /** * The cached value of the '{@link #getRange() Range}' containment reference. * * * @see #getRange() * @generated * @ordered */ protected SMTTypeReference range; /** * * * @generated */ protected SMTSortedVariableImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SmtLanguagePackage.Literals.SMT_SORTED_VARIABLE; } /** * * * @generated */ public SMTTypeReference getRange() { return range; } /** * * * @generated */ public NotificationChain basicSetRange(SMTTypeReference newRange, NotificationChain msgs) { SMTTypeReference oldRange = range; range = newRange; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE, oldRange, newRange); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setRange(SMTTypeReference newRange) { if (newRange != range) { NotificationChain msgs = null; if (range != null) msgs = ((InternalEObject)range).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE, null, msgs); if (newRange != null) msgs = ((InternalEObject)newRange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE, null, msgs); msgs = basicSetRange(newRange, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE, newRange, newRange)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE: return basicSetRange(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE: return getRange(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE: setRange((SMTTypeReference)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE: setRange((SMTTypeReference)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SmtLanguagePackage.SMT_SORTED_VARIABLE__RANGE: return range != null; } return super.eIsSet(featureID); } } //SMTSortedVariableImpl