Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.qvtd.xtext.qvtrelation/emf-gen/org/eclipse/qvtd/xtext/qvtrelationcst/impl/TemplateCSImpl.java')
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtrelation/emf-gen/org/eclipse/qvtd/xtext/qvtrelationcst/impl/TemplateCSImpl.java269
1 files changed, 269 insertions, 0 deletions
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtrelation/emf-gen/org/eclipse/qvtd/xtext/qvtrelationcst/impl/TemplateCSImpl.java b/plugins/org.eclipse.qvtd.xtext.qvtrelation/emf-gen/org/eclipse/qvtd/xtext/qvtrelationcst/impl/TemplateCSImpl.java
new file mode 100644
index 000000000..53b349816
--- /dev/null
+++ b/plugins/org.eclipse.qvtd.xtext.qvtrelation/emf-gen/org/eclipse/qvtd/xtext/qvtrelationcst/impl/TemplateCSImpl.java
@@ -0,0 +1,269 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2012 E.D.Willink 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
+ *
+ * Contributors:
+ * E.D.Willink - initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.qvtd.xtext.qvtrelationcst.impl;
+
+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.ocl.examples.xtext.base.util.BaseCSVisitor;
+import org.eclipse.ocl.examples.xtext.essentialocl.essentialOCLCST.EssentialOCLCSTPackage;
+import org.eclipse.ocl.examples.xtext.essentialocl.essentialOCLCST.ExpCS;
+import org.eclipse.ocl.examples.xtext.essentialocl.essentialOCLCST.OperatorCS;
+import org.eclipse.qvtd.xtext.qvtrelationcst.QVTrelationCSTPackage;
+import org.eclipse.qvtd.xtext.qvtrelationcst.TemplateCS;
+import org.eclipse.qvtd.xtext.qvtrelationcst.util.QVTrelationCSVisitor;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Template CS</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.qvtd.xtext.qvtrelationcst.impl.TemplateCSImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.qvtd.xtext.qvtrelationcst.impl.TemplateCSImpl#getGuardExpression <em>Guard Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TemplateCSImpl extends TemplateVariableCSImpl implements TemplateCS {
+ /**
+ * The cached value of the '{@link #getParent() <em>Parent</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParent()
+ * @generated
+ * @ordered
+ */
+ protected OperatorCS parent;
+
+ /**
+ * The cached value of the '{@link #getGuardExpression() <em>Guard Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGuardExpression()
+ * @generated
+ * @ordered
+ */
+ protected ExpCS guardExpression;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TemplateCSImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return QVTrelationCSTPackage.Literals.TEMPLATE_CS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OperatorCS getParent() {
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParent(OperatorCS newParent) {
+ OperatorCS oldParent = parent;
+ parent = newParent;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, QVTrelationCSTPackage.TEMPLATE_CS__PARENT, oldParent, parent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpCS getGuardExpression() {
+ return guardExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGuardExpression(ExpCS newGuardExpression, NotificationChain msgs) {
+ ExpCS oldGuardExpression = guardExpression;
+ guardExpression = newGuardExpression;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION, oldGuardExpression, newGuardExpression);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGuardExpression(ExpCS newGuardExpression) {
+ if (newGuardExpression != guardExpression) {
+ NotificationChain msgs = null;
+ if (guardExpression != null)
+ msgs = ((InternalEObject)guardExpression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION, null, msgs);
+ if (newGuardExpression != null)
+ msgs = ((InternalEObject)newGuardExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION, null, msgs);
+ msgs = basicSetGuardExpression(newGuardExpression, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION, newGuardExpression, newGuardExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION:
+ return basicSetGuardExpression(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 QVTrelationCSTPackage.TEMPLATE_CS__PARENT:
+ return getParent();
+ case QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION:
+ return getGuardExpression();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case QVTrelationCSTPackage.TEMPLATE_CS__PARENT:
+ setParent((OperatorCS)newValue);
+ return;
+ case QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION:
+ setGuardExpression((ExpCS)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case QVTrelationCSTPackage.TEMPLATE_CS__PARENT:
+ setParent((OperatorCS)null);
+ return;
+ case QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION:
+ setGuardExpression((ExpCS)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case QVTrelationCSTPackage.TEMPLATE_CS__PARENT:
+ return parent != null;
+ case QVTrelationCSTPackage.TEMPLATE_CS__GUARD_EXPRESSION:
+ return guardExpression != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == ExpCS.class) {
+ switch (derivedFeatureID) {
+ case QVTrelationCSTPackage.TEMPLATE_CS__PARENT: return EssentialOCLCSTPackage.EXP_CS__PARENT;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == ExpCS.class) {
+ switch (baseFeatureID) {
+ case EssentialOCLCSTPackage.EXP_CS__PARENT: return QVTrelationCSTPackage.TEMPLATE_CS__PARENT;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <R, C> R accept(BaseCSVisitor<R, C> visitor) {
+ return (R) visitor.getAdapter(QVTrelationCSVisitor.class).visitTemplateCS(this);
+ }
+} //TemplateCSImpl

Back to the top