diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/GuardedTransitionImpl.java')
-rw-r--r-- | plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/GuardedTransitionImpl.java | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/GuardedTransitionImpl.java b/plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/GuardedTransitionImpl.java new file mode 100644 index 000000000..da9deba7e --- /dev/null +++ b/plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/GuardedTransitionImpl.java @@ -0,0 +1,193 @@ +/** + */ +package org.eclipse.etrice.core.fsm.fSM.impl; + +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; + +import org.eclipse.etrice.core.fsm.fSM.DetailCode; +import org.eclipse.etrice.core.fsm.fSM.FSMPackage; +import org.eclipse.etrice.core.fsm.fSM.GuardedTransition; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Guarded Transition</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.etrice.core.fsm.fSM.impl.GuardedTransitionImpl#getGuard <em>Guard</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class GuardedTransitionImpl extends TransitionChainStartTransitionImpl implements GuardedTransition +{ + /** + * The cached value of the '{@link #getGuard() <em>Guard</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGuard() + * @generated + * @ordered + */ + protected DetailCode guard; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected GuardedTransitionImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return FSMPackage.Literals.GUARDED_TRANSITION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DetailCode getGuard() + { + return guard; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetGuard(DetailCode newGuard, NotificationChain msgs) + { + DetailCode oldGuard = guard; + guard = newGuard; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FSMPackage.GUARDED_TRANSITION__GUARD, oldGuard, newGuard); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setGuard(DetailCode newGuard) + { + if (newGuard != guard) + { + NotificationChain msgs = null; + if (guard != null) + msgs = ((InternalEObject)guard).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FSMPackage.GUARDED_TRANSITION__GUARD, null, msgs); + if (newGuard != null) + msgs = ((InternalEObject)newGuard).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FSMPackage.GUARDED_TRANSITION__GUARD, null, msgs); + msgs = basicSetGuard(newGuard, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FSMPackage.GUARDED_TRANSITION__GUARD, newGuard, newGuard)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case FSMPackage.GUARDED_TRANSITION__GUARD: + return basicSetGuard(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case FSMPackage.GUARDED_TRANSITION__GUARD: + return getGuard(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case FSMPackage.GUARDED_TRANSITION__GUARD: + setGuard((DetailCode)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case FSMPackage.GUARDED_TRANSITION__GUARD: + setGuard((DetailCode)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case FSMPackage.GUARDED_TRANSITION__GUARD: + return guard != null; + } + return super.eIsSet(featureID); + } + +} //GuardedTransitionImpl |