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