/** | |
* <copyright> | |
* </copyright> | |
* | |
* $Id$ | |
*/ | |
package comrel.impl; | |
import comrel.ComrelPackage; | |
import comrel.MultiFilterHelper; | |
import comrel.MultiOutputPort; | |
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; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Multi Filter Helper</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link comrel.impl.MultiFilterHelperImpl#getOutputPort <em>Output Port</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class MultiFilterHelperImpl extends FilterHelperImpl implements MultiFilterHelper { | |
/** | |
* The cached value of the '{@link #getOutputPort() <em>Output Port</em>}' containment reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getOutputPort() | |
* @generated | |
* @ordered | |
*/ | |
protected MultiOutputPort outputPort; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected MultiFilterHelperImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return ComrelPackage.Literals.MULTI_FILTER_HELPER; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public MultiOutputPort getOutputPort() { | |
return outputPort; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public NotificationChain basicSetOutputPort(MultiOutputPort newOutputPort, NotificationChain msgs) { | |
MultiOutputPort oldOutputPort = outputPort; | |
outputPort = newOutputPort; | |
if (eNotificationRequired()) { | |
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT, oldOutputPort, newOutputPort); | |
if (msgs == null) msgs = notification; else msgs.add(notification); | |
} | |
return msgs; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setOutputPort(MultiOutputPort newOutputPort) { | |
if (newOutputPort != outputPort) { | |
NotificationChain msgs = null; | |
if (outputPort != null) | |
msgs = ((InternalEObject)outputPort).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT, null, msgs); | |
if (newOutputPort != null) | |
msgs = ((InternalEObject)newOutputPort).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT, null, msgs); | |
msgs = basicSetOutputPort(newOutputPort, msgs); | |
if (msgs != null) msgs.dispatch(); | |
} | |
else if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT, newOutputPort, newOutputPort)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | |
switch (featureID) { | |
case ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT: | |
return basicSetOutputPort(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 ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT: | |
return getOutputPort(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT: | |
setOutputPort((MultiOutputPort)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT: | |
setOutputPort((MultiOutputPort)null); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case ComrelPackage.MULTI_FILTER_HELPER__OUTPUT_PORT: | |
return outputPort != null; | |
} | |
return super.eIsSet(featureID); | |
} | |
} //MultiFilterHelperImpl |