aboutsummaryrefslogtreecommitdiffstats
path: root/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/IfElseImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/IfElseImpl.java')
-rw-r--r--Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/IfElseImpl.java314
1 files changed, 314 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/IfElseImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/IfElseImpl.java
new file mode 100644
index 00000000..3c6bb17a
--- /dev/null
+++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/IfElseImpl.java
@@ -0,0 +1,314 @@
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.Expression;
15import org.eclipse.viatra.solver.language.solverLanguage.IfElse;
16import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage;
17
18/**
19 * <!-- begin-user-doc -->
20 * An implementation of the model object '<em><b>If Else</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.IfElseImpl#getThen <em>Then</em>}</li>
27 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.IfElseImpl#getElse <em>Else</em>}</li>
28 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.IfElseImpl#getCondition <em>Condition</em>}</li>
29 * </ul>
30 *
31 * @generated
32 */
33public class IfElseImpl extends ExpressionImpl implements IfElse {
34 /**
35 * The cached value of the '{@link #getThen() <em>Then</em>}' containment reference.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @see #getThen()
39 * @generated
40 * @ordered
41 */
42 protected Expression then;
43
44 /**
45 * The cached value of the '{@link #getElse() <em>Else</em>}' containment reference.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #getElse()
49 * @generated
50 * @ordered
51 */
52 protected Expression else_;
53
54 /**
55 * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #getCondition()
59 * @generated
60 * @ordered
61 */
62 protected Expression condition;
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 protected IfElseImpl() {
70 super();
71 }
72
73 /**
74 * <!-- begin-user-doc -->
75 * <!-- end-user-doc -->
76 * @generated
77 */
78 @Override
79 protected EClass eStaticClass() {
80 return SolverLanguagePackage.Literals.IF_ELSE;
81 }
82
83 /**
84 * <!-- begin-user-doc -->
85 * <!-- end-user-doc -->
86 * @generated
87 */
88 @Override
89 public Expression getThen() {
90 return then;
91 }
92
93 /**
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
96 * @generated
97 */
98 public NotificationChain basicSetThen(Expression newThen, NotificationChain msgs) {
99 Expression oldThen = then;
100 then = newThen;
101 if (eNotificationRequired()) {
102 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.IF_ELSE__THEN, oldThen, newThen);
103 if (msgs == null) msgs = notification; else msgs.add(notification);
104 }
105 return msgs;
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public void setThen(Expression newThen) {
115 if (newThen != then) {
116 NotificationChain msgs = null;
117 if (then != null)
118 msgs = ((InternalEObject)then).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.IF_ELSE__THEN, null, msgs);
119 if (newThen != null)
120 msgs = ((InternalEObject)newThen).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.IF_ELSE__THEN, null, msgs);
121 msgs = basicSetThen(newThen, msgs);
122 if (msgs != null) msgs.dispatch();
123 }
124 else if (eNotificationRequired())
125 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.IF_ELSE__THEN, newThen, newThen));
126 }
127
128 /**
129 * <!-- begin-user-doc -->
130 * <!-- end-user-doc -->
131 * @generated
132 */
133 @Override
134 public Expression getElse() {
135 return else_;
136 }
137
138 /**
139 * <!-- begin-user-doc -->
140 * <!-- end-user-doc -->
141 * @generated
142 */
143 public NotificationChain basicSetElse(Expression newElse, NotificationChain msgs) {
144 Expression oldElse = else_;
145 else_ = newElse;
146 if (eNotificationRequired()) {
147 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.IF_ELSE__ELSE, oldElse, newElse);
148 if (msgs == null) msgs = notification; else msgs.add(notification);
149 }
150 return msgs;
151 }
152
153 /**
154 * <!-- begin-user-doc -->
155 * <!-- end-user-doc -->
156 * @generated
157 */
158 @Override
159 public void setElse(Expression newElse) {
160 if (newElse != else_) {
161 NotificationChain msgs = null;
162 if (else_ != null)
163 msgs = ((InternalEObject)else_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.IF_ELSE__ELSE, null, msgs);
164 if (newElse != null)
165 msgs = ((InternalEObject)newElse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.IF_ELSE__ELSE, null, msgs);
166 msgs = basicSetElse(newElse, msgs);
167 if (msgs != null) msgs.dispatch();
168 }
169 else if (eNotificationRequired())
170 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.IF_ELSE__ELSE, newElse, newElse));
171 }
172
173 /**
174 * <!-- begin-user-doc -->
175 * <!-- end-user-doc -->
176 * @generated
177 */
178 @Override
179 public Expression getCondition() {
180 return condition;
181 }
182
183 /**
184 * <!-- begin-user-doc -->
185 * <!-- end-user-doc -->
186 * @generated
187 */
188 public NotificationChain basicSetCondition(Expression newCondition, NotificationChain msgs) {
189 Expression oldCondition = condition;
190 condition = newCondition;
191 if (eNotificationRequired()) {
192 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.IF_ELSE__CONDITION, oldCondition, newCondition);
193 if (msgs == null) msgs = notification; else msgs.add(notification);
194 }
195 return msgs;
196 }
197
198 /**
199 * <!-- begin-user-doc -->
200 * <!-- end-user-doc -->
201 * @generated
202 */
203 @Override
204 public void setCondition(Expression newCondition) {
205 if (newCondition != condition) {
206 NotificationChain msgs = null;
207 if (condition != null)
208 msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.IF_ELSE__CONDITION, null, msgs);
209 if (newCondition != null)
210 msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.IF_ELSE__CONDITION, null, msgs);
211 msgs = basicSetCondition(newCondition, msgs);
212 if (msgs != null) msgs.dispatch();
213 }
214 else if (eNotificationRequired())
215 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.IF_ELSE__CONDITION, newCondition, newCondition));
216 }
217
218 /**
219 * <!-- begin-user-doc -->
220 * <!-- end-user-doc -->
221 * @generated
222 */
223 @Override
224 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
225 switch (featureID) {
226 case SolverLanguagePackage.IF_ELSE__THEN:
227 return basicSetThen(null, msgs);
228 case SolverLanguagePackage.IF_ELSE__ELSE:
229 return basicSetElse(null, msgs);
230 case SolverLanguagePackage.IF_ELSE__CONDITION:
231 return basicSetCondition(null, msgs);
232 }
233 return super.eInverseRemove(otherEnd, featureID, msgs);
234 }
235
236 /**
237 * <!-- begin-user-doc -->
238 * <!-- end-user-doc -->
239 * @generated
240 */
241 @Override
242 public Object eGet(int featureID, boolean resolve, boolean coreType) {
243 switch (featureID) {
244 case SolverLanguagePackage.IF_ELSE__THEN:
245 return getThen();
246 case SolverLanguagePackage.IF_ELSE__ELSE:
247 return getElse();
248 case SolverLanguagePackage.IF_ELSE__CONDITION:
249 return getCondition();
250 }
251 return super.eGet(featureID, resolve, coreType);
252 }
253
254 /**
255 * <!-- begin-user-doc -->
256 * <!-- end-user-doc -->
257 * @generated
258 */
259 @Override
260 public void eSet(int featureID, Object newValue) {
261 switch (featureID) {
262 case SolverLanguagePackage.IF_ELSE__THEN:
263 setThen((Expression)newValue);
264 return;
265 case SolverLanguagePackage.IF_ELSE__ELSE:
266 setElse((Expression)newValue);
267 return;
268 case SolverLanguagePackage.IF_ELSE__CONDITION:
269 setCondition((Expression)newValue);
270 return;
271 }
272 super.eSet(featureID, newValue);
273 }
274
275 /**
276 * <!-- begin-user-doc -->
277 * <!-- end-user-doc -->
278 * @generated
279 */
280 @Override
281 public void eUnset(int featureID) {
282 switch (featureID) {
283 case SolverLanguagePackage.IF_ELSE__THEN:
284 setThen((Expression)null);
285 return;
286 case SolverLanguagePackage.IF_ELSE__ELSE:
287 setElse((Expression)null);
288 return;
289 case SolverLanguagePackage.IF_ELSE__CONDITION:
290 setCondition((Expression)null);
291 return;
292 }
293 super.eUnset(featureID);
294 }
295
296 /**
297 * <!-- begin-user-doc -->
298 * <!-- end-user-doc -->
299 * @generated
300 */
301 @Override
302 public boolean eIsSet(int featureID) {
303 switch (featureID) {
304 case SolverLanguagePackage.IF_ELSE__THEN:
305 return then != null;
306 case SolverLanguagePackage.IF_ELSE__ELSE:
307 return else_ != null;
308 case SolverLanguagePackage.IF_ELSE__CONDITION:
309 return condition != null;
310 }
311 return super.eIsSet(featureID);
312 }
313
314} //IfElseImpl