| /** |
| * ******************************************************************************* |
| * Copyright (c) 2017 Timing-Architects Embedded Systems GmbH and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.amalthea.generator.configuration.impl; |
| |
| import org.eclipse.app4mc.amalthea.generator.configuration.ActivationProperties; |
| import org.eclipse.app4mc.amalthea.generator.configuration.PeriodicActivation; |
| import org.eclipse.app4mc.amalthea.generator.configuration.PeriodicTriangleShift; |
| import org.eclipse.app4mc.amalthea.generator.configuration.RTMGCPackage; |
| import org.eclipse.app4mc.amalthea.generator.configuration.SporadicActivation; |
| |
| 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.emf.ecore.impl.MinimalEObjectImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Activation Properties</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.app4mc.amalthea.generator.configuration.impl.ActivationPropertiesImpl#getPeriodicActivation <em>Periodic Activation</em>}</li> |
| * <li>{@link org.eclipse.app4mc.amalthea.generator.configuration.impl.ActivationPropertiesImpl#getPeriodicTriangleShift <em>Periodic Triangle Shift</em>}</li> |
| * <li>{@link org.eclipse.app4mc.amalthea.generator.configuration.impl.ActivationPropertiesImpl#getSporadicActivation <em>Sporadic Activation</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ActivationPropertiesImpl extends MinimalEObjectImpl.Container implements ActivationProperties { |
| /** |
| * The cached value of the '{@link #getPeriodicActivation() <em>Periodic Activation</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPeriodicActivation() |
| * @generated |
| * @ordered |
| */ |
| protected PeriodicActivation periodicActivation; |
| |
| /** |
| * The cached value of the '{@link #getPeriodicTriangleShift() <em>Periodic Triangle Shift</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPeriodicTriangleShift() |
| * @generated |
| * @ordered |
| */ |
| protected PeriodicTriangleShift periodicTriangleShift; |
| |
| /** |
| * The cached value of the '{@link #getSporadicActivation() <em>Sporadic Activation</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSporadicActivation() |
| * @generated |
| * @ordered |
| */ |
| protected SporadicActivation sporadicActivation; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ActivationPropertiesImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return RTMGCPackage.Literals.ACTIVATION_PROPERTIES; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PeriodicActivation getPeriodicActivation() { |
| return periodicActivation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetPeriodicActivation(PeriodicActivation newPeriodicActivation, NotificationChain msgs) { |
| PeriodicActivation oldPeriodicActivation = periodicActivation; |
| periodicActivation = newPeriodicActivation; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION, oldPeriodicActivation, newPeriodicActivation); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPeriodicActivation(PeriodicActivation newPeriodicActivation) { |
| if (newPeriodicActivation != periodicActivation) { |
| NotificationChain msgs = null; |
| if (periodicActivation != null) |
| msgs = ((InternalEObject)periodicActivation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION, null, msgs); |
| if (newPeriodicActivation != null) |
| msgs = ((InternalEObject)newPeriodicActivation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION, null, msgs); |
| msgs = basicSetPeriodicActivation(newPeriodicActivation, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION, newPeriodicActivation, newPeriodicActivation)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PeriodicTriangleShift getPeriodicTriangleShift() { |
| return periodicTriangleShift; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetPeriodicTriangleShift(PeriodicTriangleShift newPeriodicTriangleShift, NotificationChain msgs) { |
| PeriodicTriangleShift oldPeriodicTriangleShift = periodicTriangleShift; |
| periodicTriangleShift = newPeriodicTriangleShift; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT, oldPeriodicTriangleShift, newPeriodicTriangleShift); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPeriodicTriangleShift(PeriodicTriangleShift newPeriodicTriangleShift) { |
| if (newPeriodicTriangleShift != periodicTriangleShift) { |
| NotificationChain msgs = null; |
| if (periodicTriangleShift != null) |
| msgs = ((InternalEObject)periodicTriangleShift).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT, null, msgs); |
| if (newPeriodicTriangleShift != null) |
| msgs = ((InternalEObject)newPeriodicTriangleShift).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT, null, msgs); |
| msgs = basicSetPeriodicTriangleShift(newPeriodicTriangleShift, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT, newPeriodicTriangleShift, newPeriodicTriangleShift)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SporadicActivation getSporadicActivation() { |
| return sporadicActivation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetSporadicActivation(SporadicActivation newSporadicActivation, NotificationChain msgs) { |
| SporadicActivation oldSporadicActivation = sporadicActivation; |
| sporadicActivation = newSporadicActivation; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION, oldSporadicActivation, newSporadicActivation); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSporadicActivation(SporadicActivation newSporadicActivation) { |
| if (newSporadicActivation != sporadicActivation) { |
| NotificationChain msgs = null; |
| if (sporadicActivation != null) |
| msgs = ((InternalEObject)sporadicActivation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION, null, msgs); |
| if (newSporadicActivation != null) |
| msgs = ((InternalEObject)newSporadicActivation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION, null, msgs); |
| msgs = basicSetSporadicActivation(newSporadicActivation, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION, newSporadicActivation, newSporadicActivation)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION: |
| return basicSetPeriodicActivation(null, msgs); |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT: |
| return basicSetPeriodicTriangleShift(null, msgs); |
| case RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION: |
| return basicSetSporadicActivation(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 RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION: |
| return getPeriodicActivation(); |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT: |
| return getPeriodicTriangleShift(); |
| case RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION: |
| return getSporadicActivation(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION: |
| setPeriodicActivation((PeriodicActivation)newValue); |
| return; |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT: |
| setPeriodicTriangleShift((PeriodicTriangleShift)newValue); |
| return; |
| case RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION: |
| setSporadicActivation((SporadicActivation)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION: |
| setPeriodicActivation((PeriodicActivation)null); |
| return; |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT: |
| setPeriodicTriangleShift((PeriodicTriangleShift)null); |
| return; |
| case RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION: |
| setSporadicActivation((SporadicActivation)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_ACTIVATION: |
| return periodicActivation != null; |
| case RTMGCPackage.ACTIVATION_PROPERTIES__PERIODIC_TRIANGLE_SHIFT: |
| return periodicTriangleShift != null; |
| case RTMGCPackage.ACTIVATION_PROPERTIES__SPORADIC_ACTIVATION: |
| return sporadicActivation != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ActivationPropertiesImpl |