diff options
Diffstat (limited to 'extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/TemplateImpl.java')
-rw-r--r-- | extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/TemplateImpl.java | 235 |
1 files changed, 235 insertions, 0 deletions
diff --git a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/TemplateImpl.java b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/TemplateImpl.java new file mode 100644 index 00000000000..17a3a741071 --- /dev/null +++ b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/impl/TemplateImpl.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2013 CEA LIST + * + * 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 + * + * Contributors: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.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.C_Cpp.C_CppPackage; +import org.eclipse.papyrus.C_Cpp.Template; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Template</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.C_Cpp.impl.TemplateImpl#getDeclaration <em>Declaration</em>}</li> + * <li>{@link org.eclipse.papyrus.C_Cpp.impl.TemplateImpl#getBase_class <em>Base class</em>}</li> + * </ul> + * + * @generated + */ +public class TemplateImpl extends MinimalEObjectImpl.Container implements Template { + /** + * The default value of the '{@link #getDeclaration() <em>Declaration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeclaration() + * @generated + * @ordered + */ + protected static final String DECLARATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDeclaration() <em>Declaration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeclaration() + * @generated + * @ordered + */ + protected String declaration = DECLARATION_EDEFAULT; + + /** + * The cached value of the '{@link #getBase_class() <em>Base class</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getBase_class() + * @generated + * @ordered + */ + protected org.eclipse.uml2.uml.Class base_class; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TemplateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return C_CppPackage.Literals.TEMPLATE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getDeclaration() { + return declaration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setDeclaration(String newDeclaration) { + String oldDeclaration = declaration; + declaration = newDeclaration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, C_CppPackage.TEMPLATE__DECLARATION, oldDeclaration, declaration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public org.eclipse.uml2.uml.Class getBase_class() { + if (base_class != null && base_class.eIsProxy()) { + InternalEObject oldBase_class = (InternalEObject)base_class; + base_class = (org.eclipse.uml2.uml.Class)eResolveProxy(oldBase_class); + if (base_class != oldBase_class) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, C_CppPackage.TEMPLATE__BASE_CLASS, oldBase_class, base_class)); + } + } + return base_class; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public org.eclipse.uml2.uml.Class basicGetBase_class() { + return base_class; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setBase_class(org.eclipse.uml2.uml.Class newBase_class) { + org.eclipse.uml2.uml.Class oldBase_class = base_class; + base_class = newBase_class; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, C_CppPackage.TEMPLATE__BASE_CLASS, oldBase_class, base_class)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case C_CppPackage.TEMPLATE__DECLARATION: + return getDeclaration(); + case C_CppPackage.TEMPLATE__BASE_CLASS: + if (resolve) return getBase_class(); + return basicGetBase_class(); + } + 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.TEMPLATE__DECLARATION: + setDeclaration((String)newValue); + return; + case C_CppPackage.TEMPLATE__BASE_CLASS: + setBase_class((org.eclipse.uml2.uml.Class)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case C_CppPackage.TEMPLATE__DECLARATION: + setDeclaration(DECLARATION_EDEFAULT); + return; + case C_CppPackage.TEMPLATE__BASE_CLASS: + setBase_class((org.eclipse.uml2.uml.Class)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case C_CppPackage.TEMPLATE__DECLARATION: + return DECLARATION_EDEFAULT == null ? declaration != null : !DECLARATION_EDEFAULT.equals(declaration); + case C_CppPackage.TEMPLATE__BASE_CLASS: + return base_class != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (declaration: "); + result.append(declaration); + result.append(')'); + return result.toString(); + } + +} // TemplateImpl |