/** | |
* Copyright (c)2020 CEA LIST, Committer Name, and others. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License 2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/legal/epl-2.0/ | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* CEA LIST - Initial API and implementation | |
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr | |
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr | |
* | |
*/ | |
package org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl; | |
import org.eclipse.emf.common.notify.Notification; | |
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.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataOutput; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.pdp4engDesignPackage; | |
import org.eclipse.uml2.uml.OutputPin; | |
import org.eclipse.uml2.uml.Parameter; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Data Output</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* </p> | |
* <ul> | |
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.DataOutputImpl#getBase_OutputPin <em>Base Output Pin</em>}</li> | |
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.DataOutputImpl#getBase_Parameter <em>Base Parameter</em>}</li> | |
* </ul> | |
* | |
* @generated | |
*/ | |
public class DataOutputImpl extends MinimalEObjectImpl.Container implements DataOutput { | |
/** | |
* The cached value of the '{@link #getBase_OutputPin() <em>Base Output Pin</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_OutputPin() | |
* @generated | |
* @ordered | |
*/ | |
protected OutputPin base_OutputPin; | |
/** | |
* The cached value of the '{@link #getBase_Parameter() <em>Base Parameter</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_Parameter() | |
* @generated | |
* @ordered | |
*/ | |
protected Parameter base_Parameter; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected DataOutputImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return pdp4engDesignPackage.Literals.DATA_OUTPUT; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public OutputPin getBase_OutputPin() { | |
if (base_OutputPin != null && base_OutputPin.eIsProxy()) { | |
InternalEObject oldBase_OutputPin = (InternalEObject)base_OutputPin; | |
base_OutputPin = (OutputPin)eResolveProxy(oldBase_OutputPin); | |
if (base_OutputPin != oldBase_OutputPin) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.DATA_OUTPUT__BASE_OUTPUT_PIN, oldBase_OutputPin, base_OutputPin)); | |
} | |
} | |
return base_OutputPin; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public OutputPin basicGetBase_OutputPin() { | |
return base_OutputPin; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void setBase_OutputPin(OutputPin newBase_OutputPin) { | |
OutputPin oldBase_OutputPin = base_OutputPin; | |
base_OutputPin = newBase_OutputPin; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.DATA_OUTPUT__BASE_OUTPUT_PIN, oldBase_OutputPin, base_OutputPin)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Parameter getBase_Parameter() { | |
if (base_Parameter != null && base_Parameter.eIsProxy()) { | |
InternalEObject oldBase_Parameter = (InternalEObject)base_Parameter; | |
base_Parameter = (Parameter)eResolveProxy(oldBase_Parameter); | |
if (base_Parameter != oldBase_Parameter) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.DATA_OUTPUT__BASE_PARAMETER, oldBase_Parameter, base_Parameter)); | |
} | |
} | |
return base_Parameter; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Parameter basicGetBase_Parameter() { | |
return base_Parameter; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void setBase_Parameter(Parameter newBase_Parameter) { | |
Parameter oldBase_Parameter = base_Parameter; | |
base_Parameter = newBase_Parameter; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.DATA_OUTPUT__BASE_PARAMETER, oldBase_Parameter, base_Parameter)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_OUTPUT_PIN: | |
if (resolve) return getBase_OutputPin(); | |
return basicGetBase_OutputPin(); | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_PARAMETER: | |
if (resolve) return getBase_Parameter(); | |
return basicGetBase_Parameter(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_OUTPUT_PIN: | |
setBase_OutputPin((OutputPin)newValue); | |
return; | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_PARAMETER: | |
setBase_Parameter((Parameter)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_OUTPUT_PIN: | |
setBase_OutputPin((OutputPin)null); | |
return; | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_PARAMETER: | |
setBase_Parameter((Parameter)null); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_OUTPUT_PIN: | |
return base_OutputPin != null; | |
case pdp4engDesignPackage.DATA_OUTPUT__BASE_PARAMETER: | |
return base_Parameter != null; | |
} | |
return super.eIsSet(featureID); | |
} | |
} //DataOutputImpl |