| /** |
| */ |
| package org.eclipse.papyrus.designer.languages.cpp.profile.C_Cpp.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.designer.languages.cpp.profile.C_Cpp.C_CppPackage; |
| import org.eclipse.papyrus.designer.languages.cpp.profile.C_Cpp.Default; |
| |
| import org.eclipse.uml2.uml.Operation; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Default</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.designer.languages.cpp.profile.C_Cpp.impl.DefaultImpl#getBase_Operation <em>Base Operation</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class DefaultImpl extends MinimalEObjectImpl.Container implements Default { |
| /** |
| * The cached value of the '{@link #getBase_Operation() <em>Base Operation</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBase_Operation() |
| * @generated |
| * @ordered |
| */ |
| protected Operation base_Operation; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected DefaultImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return C_CppPackage.Literals.DEFAULT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Operation getBase_Operation() { |
| if (base_Operation != null && base_Operation.eIsProxy()) { |
| InternalEObject oldBase_Operation = (InternalEObject)base_Operation; |
| base_Operation = (Operation)eResolveProxy(oldBase_Operation); |
| if (base_Operation != oldBase_Operation) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, C_CppPackage.DEFAULT__BASE_OPERATION, oldBase_Operation, base_Operation)); |
| } |
| } |
| return base_Operation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Operation basicGetBase_Operation() { |
| return base_Operation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setBase_Operation(Operation newBase_Operation) { |
| Operation oldBase_Operation = base_Operation; |
| base_Operation = newBase_Operation; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, C_CppPackage.DEFAULT__BASE_OPERATION, oldBase_Operation, base_Operation)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case C_CppPackage.DEFAULT__BASE_OPERATION: |
| if (resolve) return getBase_Operation(); |
| return basicGetBase_Operation(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case C_CppPackage.DEFAULT__BASE_OPERATION: |
| setBase_Operation((Operation)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case C_CppPackage.DEFAULT__BASE_OPERATION: |
| setBase_Operation((Operation)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case C_CppPackage.DEFAULT__BASE_OPERATION: |
| return base_Operation != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //DefaultImpl |