/** */ package hu.bme.mit.inf.dslreasoner.smtLanguage.impl; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTITE; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTerm; 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 'SMTITE'. * *

* The following features are implemented: *

*

* * @generated */ public class SMTITEImpl extends SMTTermImpl implements SMTITE { /** * The cached value of the '{@link #getCondition() Condition}' containment reference. * * * @see #getCondition() * @generated * @ordered */ protected SMTTerm condition; /** * The cached value of the '{@link #getIf() If}' containment reference. * * * @see #getIf() * @generated * @ordered */ protected SMTTerm if_; /** * The cached value of the '{@link #getElse() Else}' containment reference. * * * @see #getElse() * @generated * @ordered */ protected SMTTerm else_; /** * * * @generated */ protected SMTITEImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SmtLanguagePackage.Literals.SMTITE; } /** * * * @generated */ public SMTTerm getCondition() { return condition; } /** * * * @generated */ public NotificationChain basicSetCondition(SMTTerm newCondition, NotificationChain msgs) { SMTTerm oldCondition = condition; condition = newCondition; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMTITE__CONDITION, oldCondition, newCondition); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setCondition(SMTTerm newCondition) { if (newCondition != condition) { NotificationChain msgs = null; if (condition != null) msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMTITE__CONDITION, null, msgs); if (newCondition != null) msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMTITE__CONDITION, null, msgs); msgs = basicSetCondition(newCondition, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMTITE__CONDITION, newCondition, newCondition)); } /** * * * @generated */ public SMTTerm getIf() { return if_; } /** * * * @generated */ public NotificationChain basicSetIf(SMTTerm newIf, NotificationChain msgs) { SMTTerm oldIf = if_; if_ = newIf; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMTITE__IF, oldIf, newIf); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setIf(SMTTerm newIf) { if (newIf != if_) { NotificationChain msgs = null; if (if_ != null) msgs = ((InternalEObject)if_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMTITE__IF, null, msgs); if (newIf != null) msgs = ((InternalEObject)newIf).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMTITE__IF, null, msgs); msgs = basicSetIf(newIf, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMTITE__IF, newIf, newIf)); } /** * * * @generated */ public SMTTerm getElse() { return else_; } /** * * * @generated */ public NotificationChain basicSetElse(SMTTerm newElse, NotificationChain msgs) { SMTTerm oldElse = else_; else_ = newElse; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMTITE__ELSE, oldElse, newElse); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setElse(SMTTerm newElse) { if (newElse != else_) { NotificationChain msgs = null; if (else_ != null) msgs = ((InternalEObject)else_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMTITE__ELSE, null, msgs); if (newElse != null) msgs = ((InternalEObject)newElse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SmtLanguagePackage.SMTITE__ELSE, null, msgs); msgs = basicSetElse(newElse, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SmtLanguagePackage.SMTITE__ELSE, newElse, newElse)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SmtLanguagePackage.SMTITE__CONDITION: return basicSetCondition(null, msgs); case SmtLanguagePackage.SMTITE__IF: return basicSetIf(null, msgs); case SmtLanguagePackage.SMTITE__ELSE: return basicSetElse(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SmtLanguagePackage.SMTITE__CONDITION: return getCondition(); case SmtLanguagePackage.SMTITE__IF: return getIf(); case SmtLanguagePackage.SMTITE__ELSE: return getElse(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SmtLanguagePackage.SMTITE__CONDITION: setCondition((SMTTerm)newValue); return; case SmtLanguagePackage.SMTITE__IF: setIf((SMTTerm)newValue); return; case SmtLanguagePackage.SMTITE__ELSE: setElse((SMTTerm)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SmtLanguagePackage.SMTITE__CONDITION: setCondition((SMTTerm)null); return; case SmtLanguagePackage.SMTITE__IF: setIf((SMTTerm)null); return; case SmtLanguagePackage.SMTITE__ELSE: setElse((SMTTerm)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SmtLanguagePackage.SMTITE__CONDITION: return condition != null; case SmtLanguagePackage.SMTITE__IF: return if_ != null; case SmtLanguagePackage.SMTITE__ELSE: return else_ != null; } return super.eIsSet(featureID); } } //SMTITEImpl