aboutsummaryrefslogtreecommitdiffstats
path: root/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregationImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregationImpl.java')
-rw-r--r--Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregationImpl.java378
1 files changed, 378 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregationImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregationImpl.java
new file mode 100644
index 00000000..0f0262df
--- /dev/null
+++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregationImpl.java
@@ -0,0 +1,378 @@
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.Aggregation;
15import org.eclipse.viatra.solver.language.solverLanguage.Expression;
16import org.eclipse.viatra.solver.language.solverLanguage.LocalVariables;
17import org.eclipse.viatra.solver.language.solverLanguage.NamedElement;
18import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>Aggregation</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregationImpl#getOp <em>Op</em>}</li>
29 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregationImpl#getLocalVariables <em>Local Variables</em>}</li>
30 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregationImpl#getBody <em>Body</em>}</li>
31 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregationImpl#getCondition <em>Condition</em>}</li>
32 * </ul>
33 *
34 * @generated
35 */
36public class AggregationImpl extends ExpressionImpl implements Aggregation {
37 /**
38 * The cached value of the '{@link #getOp() <em>Op</em>}' reference.
39 * <!-- begin-user-doc -->
40 * <!-- end-user-doc -->
41 * @see #getOp()
42 * @generated
43 * @ordered
44 */
45 protected NamedElement op;
46
47 /**
48 * The cached value of the '{@link #getLocalVariables() <em>Local Variables</em>}' containment reference.
49 * <!-- begin-user-doc -->
50 * <!-- end-user-doc -->
51 * @see #getLocalVariables()
52 * @generated
53 * @ordered
54 */
55 protected LocalVariables localVariables;
56
57 /**
58 * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference.
59 * <!-- begin-user-doc -->
60 * <!-- end-user-doc -->
61 * @see #getBody()
62 * @generated
63 * @ordered
64 */
65 protected Expression body;
66
67 /**
68 * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference.
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @see #getCondition()
72 * @generated
73 * @ordered
74 */
75 protected Expression condition;
76
77 /**
78 * <!-- begin-user-doc -->
79 * <!-- end-user-doc -->
80 * @generated
81 */
82 protected AggregationImpl() {
83 super();
84 }
85
86 /**
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @generated
90 */
91 @Override
92 protected EClass eStaticClass() {
93 return SolverLanguagePackage.Literals.AGGREGATION;
94 }
95
96 /**
97 * <!-- begin-user-doc -->
98 * <!-- end-user-doc -->
99 * @generated
100 */
101 @Override
102 public NamedElement getOp() {
103 if (op != null && op.eIsProxy()) {
104 InternalEObject oldOp = (InternalEObject)op;
105 op = (NamedElement)eResolveProxy(oldOp);
106 if (op != oldOp) {
107 if (eNotificationRequired())
108 eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.AGGREGATION__OP, oldOp, op));
109 }
110 }
111 return op;
112 }
113
114 /**
115 * <!-- begin-user-doc -->
116 * <!-- end-user-doc -->
117 * @generated
118 */
119 public NamedElement basicGetOp() {
120 return op;
121 }
122
123 /**
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @generated
127 */
128 @Override
129 public void setOp(NamedElement newOp) {
130 NamedElement oldOp = op;
131 op = newOp;
132 if (eNotificationRequired())
133 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__OP, oldOp, op));
134 }
135
136 /**
137 * <!-- begin-user-doc -->
138 * <!-- end-user-doc -->
139 * @generated
140 */
141 @Override
142 public LocalVariables getLocalVariables() {
143 return localVariables;
144 }
145
146 /**
147 * <!-- begin-user-doc -->
148 * <!-- end-user-doc -->
149 * @generated
150 */
151 public NotificationChain basicSetLocalVariables(LocalVariables newLocalVariables, NotificationChain msgs) {
152 LocalVariables oldLocalVariables = localVariables;
153 localVariables = newLocalVariables;
154 if (eNotificationRequired()) {
155 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES, oldLocalVariables, newLocalVariables);
156 if (msgs == null) msgs = notification; else msgs.add(notification);
157 }
158 return msgs;
159 }
160
161 /**
162 * <!-- begin-user-doc -->
163 * <!-- end-user-doc -->
164 * @generated
165 */
166 @Override
167 public void setLocalVariables(LocalVariables newLocalVariables) {
168 if (newLocalVariables != localVariables) {
169 NotificationChain msgs = null;
170 if (localVariables != null)
171 msgs = ((InternalEObject)localVariables).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES, null, msgs);
172 if (newLocalVariables != null)
173 msgs = ((InternalEObject)newLocalVariables).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES, null, msgs);
174 msgs = basicSetLocalVariables(newLocalVariables, msgs);
175 if (msgs != null) msgs.dispatch();
176 }
177 else if (eNotificationRequired())
178 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES, newLocalVariables, newLocalVariables));
179 }
180
181 /**
182 * <!-- begin-user-doc -->
183 * <!-- end-user-doc -->
184 * @generated
185 */
186 @Override
187 public Expression getBody() {
188 return body;
189 }
190
191 /**
192 * <!-- begin-user-doc -->
193 * <!-- end-user-doc -->
194 * @generated
195 */
196 public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) {
197 Expression oldBody = body;
198 body = newBody;
199 if (eNotificationRequired()) {
200 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__BODY, oldBody, newBody);
201 if (msgs == null) msgs = notification; else msgs.add(notification);
202 }
203 return msgs;
204 }
205
206 /**
207 * <!-- begin-user-doc -->
208 * <!-- end-user-doc -->
209 * @generated
210 */
211 @Override
212 public void setBody(Expression newBody) {
213 if (newBody != body) {
214 NotificationChain msgs = null;
215 if (body != null)
216 msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATION__BODY, null, msgs);
217 if (newBody != null)
218 msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATION__BODY, null, msgs);
219 msgs = basicSetBody(newBody, msgs);
220 if (msgs != null) msgs.dispatch();
221 }
222 else if (eNotificationRequired())
223 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__BODY, newBody, newBody));
224 }
225
226 /**
227 * <!-- begin-user-doc -->
228 * <!-- end-user-doc -->
229 * @generated
230 */
231 @Override
232 public Expression getCondition() {
233 return condition;
234 }
235
236 /**
237 * <!-- begin-user-doc -->
238 * <!-- end-user-doc -->
239 * @generated
240 */
241 public NotificationChain basicSetCondition(Expression newCondition, NotificationChain msgs) {
242 Expression oldCondition = condition;
243 condition = newCondition;
244 if (eNotificationRequired()) {
245 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__CONDITION, oldCondition, newCondition);
246 if (msgs == null) msgs = notification; else msgs.add(notification);
247 }
248 return msgs;
249 }
250
251 /**
252 * <!-- begin-user-doc -->
253 * <!-- end-user-doc -->
254 * @generated
255 */
256 @Override
257 public void setCondition(Expression newCondition) {
258 if (newCondition != condition) {
259 NotificationChain msgs = null;
260 if (condition != null)
261 msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATION__CONDITION, null, msgs);
262 if (newCondition != null)
263 msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATION__CONDITION, null, msgs);
264 msgs = basicSetCondition(newCondition, msgs);
265 if (msgs != null) msgs.dispatch();
266 }
267 else if (eNotificationRequired())
268 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATION__CONDITION, newCondition, newCondition));
269 }
270
271 /**
272 * <!-- begin-user-doc -->
273 * <!-- end-user-doc -->
274 * @generated
275 */
276 @Override
277 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
278 switch (featureID) {
279 case SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES:
280 return basicSetLocalVariables(null, msgs);
281 case SolverLanguagePackage.AGGREGATION__BODY:
282 return basicSetBody(null, msgs);
283 case SolverLanguagePackage.AGGREGATION__CONDITION:
284 return basicSetCondition(null, msgs);
285 }
286 return super.eInverseRemove(otherEnd, featureID, msgs);
287 }
288
289 /**
290 * <!-- begin-user-doc -->
291 * <!-- end-user-doc -->
292 * @generated
293 */
294 @Override
295 public Object eGet(int featureID, boolean resolve, boolean coreType) {
296 switch (featureID) {
297 case SolverLanguagePackage.AGGREGATION__OP:
298 if (resolve) return getOp();
299 return basicGetOp();
300 case SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES:
301 return getLocalVariables();
302 case SolverLanguagePackage.AGGREGATION__BODY:
303 return getBody();
304 case SolverLanguagePackage.AGGREGATION__CONDITION:
305 return getCondition();
306 }
307 return super.eGet(featureID, resolve, coreType);
308 }
309
310 /**
311 * <!-- begin-user-doc -->
312 * <!-- end-user-doc -->
313 * @generated
314 */
315 @Override
316 public void eSet(int featureID, Object newValue) {
317 switch (featureID) {
318 case SolverLanguagePackage.AGGREGATION__OP:
319 setOp((NamedElement)newValue);
320 return;
321 case SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES:
322 setLocalVariables((LocalVariables)newValue);
323 return;
324 case SolverLanguagePackage.AGGREGATION__BODY:
325 setBody((Expression)newValue);
326 return;
327 case SolverLanguagePackage.AGGREGATION__CONDITION:
328 setCondition((Expression)newValue);
329 return;
330 }
331 super.eSet(featureID, newValue);
332 }
333
334 /**
335 * <!-- begin-user-doc -->
336 * <!-- end-user-doc -->
337 * @generated
338 */
339 @Override
340 public void eUnset(int featureID) {
341 switch (featureID) {
342 case SolverLanguagePackage.AGGREGATION__OP:
343 setOp((NamedElement)null);
344 return;
345 case SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES:
346 setLocalVariables((LocalVariables)null);
347 return;
348 case SolverLanguagePackage.AGGREGATION__BODY:
349 setBody((Expression)null);
350 return;
351 case SolverLanguagePackage.AGGREGATION__CONDITION:
352 setCondition((Expression)null);
353 return;
354 }
355 super.eUnset(featureID);
356 }
357
358 /**
359 * <!-- begin-user-doc -->
360 * <!-- end-user-doc -->
361 * @generated
362 */
363 @Override
364 public boolean eIsSet(int featureID) {
365 switch (featureID) {
366 case SolverLanguagePackage.AGGREGATION__OP:
367 return op != null;
368 case SolverLanguagePackage.AGGREGATION__LOCAL_VARIABLES:
369 return localVariables != null;
370 case SolverLanguagePackage.AGGREGATION__BODY:
371 return body != null;
372 case SolverLanguagePackage.AGGREGATION__CONDITION:
373 return condition != null;
374 }
375 return super.eIsSet(featureID);
376 }
377
378} //AggregationImpl