aboutsummaryrefslogtreecommitdiffstats
path: root/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java')
-rw-r--r--Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java246
1 files changed, 246 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java
new file mode 100644
index 00000000..d6905f3b
--- /dev/null
+++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java
@@ -0,0 +1,246 @@
1/**
2 * generated by Xtext 2.21.0
3 */
4package org.eclipse.viatra.solver.language.solverLanguage.impl;
5
6import org.eclipse.emf.common.notify.Notification;
7import org.eclipse.emf.common.notify.NotificationChain;
8
9import org.eclipse.emf.ecore.EClass;
10import org.eclipse.emf.ecore.InternalEObject;
11
12import org.eclipse.emf.ecore.impl.ENotificationImpl;
13
14import org.eclipse.viatra.solver.language.solverLanguage.Case;
15import org.eclipse.viatra.solver.language.solverLanguage.Expression;
16import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage;
17
18/**
19 * <!-- begin-user-doc -->
20 * An implementation of the model object '<em><b>Case</b></em>'.
21 * <!-- end-user-doc -->
22 * <p>
23 * The following features are implemented:
24 * </p>
25 * <ul>
26 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.CaseImpl#getBody <em>Body</em>}</li>
27 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.CaseImpl#getCondition <em>Condition</em>}</li>
28 * </ul>
29 *
30 * @generated
31 */
32public class CaseImpl extends ExpressionImpl implements Case {
33 /**
34 * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference.
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @see #getBody()
38 * @generated
39 * @ordered
40 */
41 protected Expression body;
42
43 /**
44 * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference.
45 * <!-- begin-user-doc -->
46 * <!-- end-user-doc -->
47 * @see #getCondition()
48 * @generated
49 * @ordered
50 */
51 protected Expression condition;
52
53 /**
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @generated
57 */
58 protected CaseImpl() {
59 super();
60 }
61
62 /**
63 * <!-- begin-user-doc -->
64 * <!-- end-user-doc -->
65 * @generated
66 */
67 @Override
68 protected EClass eStaticClass() {
69 return SolverLanguagePackage.Literals.CASE;
70 }
71
72 /**
73 * <!-- begin-user-doc -->
74 * <!-- end-user-doc -->
75 * @generated
76 */
77 @Override
78 public Expression getBody() {
79 return body;
80 }
81
82 /**
83 * <!-- begin-user-doc -->
84 * <!-- end-user-doc -->
85 * @generated
86 */
87 public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) {
88 Expression oldBody = body;
89 body = newBody;
90 if (eNotificationRequired()) {
91 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__BODY, oldBody, newBody);
92 if (msgs == null) msgs = notification; else msgs.add(notification);
93 }
94 return msgs;
95 }
96
97 /**
98 * <!-- begin-user-doc -->
99 * <!-- end-user-doc -->
100 * @generated
101 */
102 @Override
103 public void setBody(Expression newBody) {
104 if (newBody != body) {
105 NotificationChain msgs = null;
106 if (body != null)
107 msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__BODY, null, msgs);
108 if (newBody != null)
109 msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__BODY, null, msgs);
110 msgs = basicSetBody(newBody, msgs);
111 if (msgs != null) msgs.dispatch();
112 }
113 else if (eNotificationRequired())
114 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__BODY, newBody, newBody));
115 }
116
117 /**
118 * <!-- begin-user-doc -->
119 * <!-- end-user-doc -->
120 * @generated
121 */
122 @Override
123 public Expression getCondition() {
124 return condition;
125 }
126
127 /**
128 * <!-- begin-user-doc -->
129 * <!-- end-user-doc -->
130 * @generated
131 */
132 public NotificationChain basicSetCondition(Expression newCondition, NotificationChain msgs) {
133 Expression oldCondition = condition;
134 condition = newCondition;
135 if (eNotificationRequired()) {
136 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__CONDITION, oldCondition, newCondition);
137 if (msgs == null) msgs = notification; else msgs.add(notification);
138 }
139 return msgs;
140 }
141
142 /**
143 * <!-- begin-user-doc -->
144 * <!-- end-user-doc -->
145 * @generated
146 */
147 @Override
148 public void setCondition(Expression newCondition) {
149 if (newCondition != condition) {
150 NotificationChain msgs = null;
151 if (condition != null)
152 msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__CONDITION, null, msgs);
153 if (newCondition != null)
154 msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__CONDITION, null, msgs);
155 msgs = basicSetCondition(newCondition, msgs);
156 if (msgs != null) msgs.dispatch();
157 }
158 else if (eNotificationRequired())
159 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__CONDITION, newCondition, newCondition));
160 }
161
162 /**
163 * <!-- begin-user-doc -->
164 * <!-- end-user-doc -->
165 * @generated
166 */
167 @Override
168 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
169 switch (featureID) {
170 case SolverLanguagePackage.CASE__BODY:
171 return basicSetBody(null, msgs);
172 case SolverLanguagePackage.CASE__CONDITION:
173 return basicSetCondition(null, msgs);
174 }
175 return super.eInverseRemove(otherEnd, featureID, msgs);
176 }
177
178 /**
179 * <!-- begin-user-doc -->
180 * <!-- end-user-doc -->
181 * @generated
182 */
183 @Override
184 public Object eGet(int featureID, boolean resolve, boolean coreType) {
185 switch (featureID) {
186 case SolverLanguagePackage.CASE__BODY:
187 return getBody();
188 case SolverLanguagePackage.CASE__CONDITION:
189 return getCondition();
190 }
191 return super.eGet(featureID, resolve, coreType);
192 }
193
194 /**
195 * <!-- begin-user-doc -->
196 * <!-- end-user-doc -->
197 * @generated
198 */
199 @Override
200 public void eSet(int featureID, Object newValue) {
201 switch (featureID) {
202 case SolverLanguagePackage.CASE__BODY:
203 setBody((Expression)newValue);
204 return;
205 case SolverLanguagePackage.CASE__CONDITION:
206 setCondition((Expression)newValue);
207 return;
208 }
209 super.eSet(featureID, newValue);
210 }
211
212 /**
213 * <!-- begin-user-doc -->
214 * <!-- end-user-doc -->
215 * @generated
216 */
217 @Override
218 public void eUnset(int featureID) {
219 switch (featureID) {
220 case SolverLanguagePackage.CASE__BODY:
221 setBody((Expression)null);
222 return;
223 case SolverLanguagePackage.CASE__CONDITION:
224 setCondition((Expression)null);
225 return;
226 }
227 super.eUnset(featureID);
228 }
229
230 /**
231 * <!-- begin-user-doc -->
232 * <!-- end-user-doc -->
233 * @generated
234 */
235 @Override
236 public boolean eIsSet(int featureID) {
237 switch (featureID) {
238 case SolverLanguagePackage.CASE__BODY:
239 return body != null;
240 case SolverLanguagePackage.CASE__CONDITION:
241 return condition != null;
242 }
243 return super.eIsSet(featureID);
244 }
245
246} //CaseImpl