Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/TriggerImpl.java')
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/TriggerImpl.java241
1 files changed, 241 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/TriggerImpl.java b/plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/TriggerImpl.java
new file mode 100644
index 000000000..3941566a7
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.fsm/src-gen/org/eclipse/etrice/core/fsm/fSM/impl/TriggerImpl.java
@@ -0,0 +1,241 @@
+/**
+ */
+package org.eclipse.etrice.core.fsm.fSM.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
+import org.eclipse.etrice.core.fsm.fSM.Guard;
+import org.eclipse.etrice.core.fsm.fSM.MessageFromIf;
+import org.eclipse.etrice.core.fsm.fSM.Trigger;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Trigger</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.fsm.fSM.impl.TriggerImpl#getMsgFromIfPairs <em>Msg From If Pairs</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.fsm.fSM.impl.TriggerImpl#getGuard <em>Guard</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TriggerImpl extends MinimalEObjectImpl.Container implements Trigger
+{
+ /**
+ * The cached value of the '{@link #getMsgFromIfPairs() <em>Msg From If Pairs</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMsgFromIfPairs()
+ * @generated
+ * @ordered
+ */
+ protected EList<MessageFromIf> msgFromIfPairs;
+
+ /**
+ * The cached value of the '{@link #getGuard() <em>Guard</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGuard()
+ * @generated
+ * @ordered
+ */
+ protected Guard guard;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TriggerImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return FSMPackage.Literals.TRIGGER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<MessageFromIf> getMsgFromIfPairs()
+ {
+ if (msgFromIfPairs == null)
+ {
+ msgFromIfPairs = new EObjectContainmentEList<MessageFromIf>(MessageFromIf.class, this, FSMPackage.TRIGGER__MSG_FROM_IF_PAIRS);
+ }
+ return msgFromIfPairs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Guard getGuard()
+ {
+ return guard;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGuard(Guard newGuard, NotificationChain msgs)
+ {
+ Guard oldGuard = guard;
+ guard = newGuard;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FSMPackage.TRIGGER__GUARD, oldGuard, newGuard);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGuard(Guard newGuard)
+ {
+ if (newGuard != guard)
+ {
+ NotificationChain msgs = null;
+ if (guard != null)
+ msgs = ((InternalEObject)guard).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FSMPackage.TRIGGER__GUARD, null, msgs);
+ if (newGuard != null)
+ msgs = ((InternalEObject)newGuard).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FSMPackage.TRIGGER__GUARD, null, msgs);
+ msgs = basicSetGuard(newGuard, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FSMPackage.TRIGGER__GUARD, newGuard, newGuard));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case FSMPackage.TRIGGER__MSG_FROM_IF_PAIRS:
+ return ((InternalEList<?>)getMsgFromIfPairs()).basicRemove(otherEnd, msgs);
+ case FSMPackage.TRIGGER__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.TRIGGER__MSG_FROM_IF_PAIRS:
+ return getMsgFromIfPairs();
+ case FSMPackage.TRIGGER__GUARD:
+ return getGuard();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case FSMPackage.TRIGGER__MSG_FROM_IF_PAIRS:
+ getMsgFromIfPairs().clear();
+ getMsgFromIfPairs().addAll((Collection<? extends MessageFromIf>)newValue);
+ return;
+ case FSMPackage.TRIGGER__GUARD:
+ setGuard((Guard)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case FSMPackage.TRIGGER__MSG_FROM_IF_PAIRS:
+ getMsgFromIfPairs().clear();
+ return;
+ case FSMPackage.TRIGGER__GUARD:
+ setGuard((Guard)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case FSMPackage.TRIGGER__MSG_FROM_IF_PAIRS:
+ return msgFromIfPairs != null && !msgFromIfPairs.isEmpty();
+ case FSMPackage.TRIGGER__GUARD:
+ return guard != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //TriggerImpl

Back to the top