diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateDefinitionImpl.java | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateDefinitionImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateDefinitionImpl.java | 372 |
1 files changed, 372 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateDefinitionImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateDefinitionImpl.java new file mode 100644 index 00000000..251a27d9 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateDefinitionImpl.java | |||
@@ -0,0 +1,372 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.21.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import org.eclipse.emf.common.notify.Notification; | ||
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.ecore.EClass; | ||
10 | import org.eclipse.emf.ecore.InternalEObject; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.solverLanguage.Expression; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.PredicateDefinition; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Predicate Definition</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.PredicateDefinitionImpl#getHead <em>Head</em>}</li> | ||
27 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.PredicateDefinitionImpl#getBody <em>Body</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.PredicateDefinitionImpl#isFunctional <em>Functional</em>}</li> | ||
29 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.PredicateDefinitionImpl#isError <em>Error</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class PredicateDefinitionImpl extends StatementImpl implements PredicateDefinition { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getHead() <em>Head</em>}' containment reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getHead() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected Expression head; | ||
44 | |||
45 | /** | ||
46 | * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getBody() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected Expression body; | ||
54 | |||
55 | /** | ||
56 | * The default value of the '{@link #isFunctional() <em>Functional</em>}' attribute. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #isFunctional() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected static final boolean FUNCTIONAL_EDEFAULT = false; | ||
64 | |||
65 | /** | ||
66 | * The cached value of the '{@link #isFunctional() <em>Functional</em>}' attribute. | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @see #isFunctional() | ||
70 | * @generated | ||
71 | * @ordered | ||
72 | */ | ||
73 | protected boolean functional = FUNCTIONAL_EDEFAULT; | ||
74 | |||
75 | /** | ||
76 | * The default value of the '{@link #isError() <em>Error</em>}' attribute. | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @see #isError() | ||
80 | * @generated | ||
81 | * @ordered | ||
82 | */ | ||
83 | protected static final boolean ERROR_EDEFAULT = false; | ||
84 | |||
85 | /** | ||
86 | * The cached value of the '{@link #isError() <em>Error</em>}' attribute. | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @see #isError() | ||
90 | * @generated | ||
91 | * @ordered | ||
92 | */ | ||
93 | protected boolean error = ERROR_EDEFAULT; | ||
94 | |||
95 | /** | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @generated | ||
99 | */ | ||
100 | protected PredicateDefinitionImpl() { | ||
101 | super(); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @Override | ||
110 | protected EClass eStaticClass() { | ||
111 | return SolverLanguagePackage.Literals.PREDICATE_DEFINITION; | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public Expression getHead() { | ||
121 | return head; | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | public NotificationChain basicSetHead(Expression newHead, NotificationChain msgs) { | ||
130 | Expression oldHead = head; | ||
131 | head = newHead; | ||
132 | if (eNotificationRequired()) { | ||
133 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_DEFINITION__HEAD, oldHead, newHead); | ||
134 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
135 | } | ||
136 | return msgs; | ||
137 | } | ||
138 | |||
139 | /** | ||
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @generated | ||
143 | */ | ||
144 | @Override | ||
145 | public void setHead(Expression newHead) { | ||
146 | if (newHead != head) { | ||
147 | NotificationChain msgs = null; | ||
148 | if (head != null) | ||
149 | msgs = ((InternalEObject)head).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PREDICATE_DEFINITION__HEAD, null, msgs); | ||
150 | if (newHead != null) | ||
151 | msgs = ((InternalEObject)newHead).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PREDICATE_DEFINITION__HEAD, null, msgs); | ||
152 | msgs = basicSetHead(newHead, msgs); | ||
153 | if (msgs != null) msgs.dispatch(); | ||
154 | } | ||
155 | else if (eNotificationRequired()) | ||
156 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_DEFINITION__HEAD, newHead, newHead)); | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * <!-- begin-user-doc --> | ||
161 | * <!-- end-user-doc --> | ||
162 | * @generated | ||
163 | */ | ||
164 | @Override | ||
165 | public Expression getBody() { | ||
166 | return body; | ||
167 | } | ||
168 | |||
169 | /** | ||
170 | * <!-- begin-user-doc --> | ||
171 | * <!-- end-user-doc --> | ||
172 | * @generated | ||
173 | */ | ||
174 | public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { | ||
175 | Expression oldBody = body; | ||
176 | body = newBody; | ||
177 | if (eNotificationRequired()) { | ||
178 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_DEFINITION__BODY, oldBody, newBody); | ||
179 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
180 | } | ||
181 | return msgs; | ||
182 | } | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | @Override | ||
190 | public void setBody(Expression newBody) { | ||
191 | if (newBody != body) { | ||
192 | NotificationChain msgs = null; | ||
193 | if (body != null) | ||
194 | msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PREDICATE_DEFINITION__BODY, null, msgs); | ||
195 | if (newBody != null) | ||
196 | msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PREDICATE_DEFINITION__BODY, null, msgs); | ||
197 | msgs = basicSetBody(newBody, msgs); | ||
198 | if (msgs != null) msgs.dispatch(); | ||
199 | } | ||
200 | else if (eNotificationRequired()) | ||
201 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_DEFINITION__BODY, newBody, newBody)); | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * <!-- begin-user-doc --> | ||
206 | * <!-- end-user-doc --> | ||
207 | * @generated | ||
208 | */ | ||
209 | @Override | ||
210 | public boolean isFunctional() { | ||
211 | return functional; | ||
212 | } | ||
213 | |||
214 | /** | ||
215 | * <!-- begin-user-doc --> | ||
216 | * <!-- end-user-doc --> | ||
217 | * @generated | ||
218 | */ | ||
219 | @Override | ||
220 | public void setFunctional(boolean newFunctional) { | ||
221 | boolean oldFunctional = functional; | ||
222 | functional = newFunctional; | ||
223 | if (eNotificationRequired()) | ||
224 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_DEFINITION__FUNCTIONAL, oldFunctional, functional)); | ||
225 | } | ||
226 | |||
227 | /** | ||
228 | * <!-- begin-user-doc --> | ||
229 | * <!-- end-user-doc --> | ||
230 | * @generated | ||
231 | */ | ||
232 | @Override | ||
233 | public boolean isError() { | ||
234 | return error; | ||
235 | } | ||
236 | |||
237 | /** | ||
238 | * <!-- begin-user-doc --> | ||
239 | * <!-- end-user-doc --> | ||
240 | * @generated | ||
241 | */ | ||
242 | @Override | ||
243 | public void setError(boolean newError) { | ||
244 | boolean oldError = error; | ||
245 | error = newError; | ||
246 | if (eNotificationRequired()) | ||
247 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_DEFINITION__ERROR, oldError, error)); | ||
248 | } | ||
249 | |||
250 | /** | ||
251 | * <!-- begin-user-doc --> | ||
252 | * <!-- end-user-doc --> | ||
253 | * @generated | ||
254 | */ | ||
255 | @Override | ||
256 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
257 | switch (featureID) { | ||
258 | case SolverLanguagePackage.PREDICATE_DEFINITION__HEAD: | ||
259 | return basicSetHead(null, msgs); | ||
260 | case SolverLanguagePackage.PREDICATE_DEFINITION__BODY: | ||
261 | return basicSetBody(null, msgs); | ||
262 | } | ||
263 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * <!-- begin-user-doc --> | ||
268 | * <!-- end-user-doc --> | ||
269 | * @generated | ||
270 | */ | ||
271 | @Override | ||
272 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
273 | switch (featureID) { | ||
274 | case SolverLanguagePackage.PREDICATE_DEFINITION__HEAD: | ||
275 | return getHead(); | ||
276 | case SolverLanguagePackage.PREDICATE_DEFINITION__BODY: | ||
277 | return getBody(); | ||
278 | case SolverLanguagePackage.PREDICATE_DEFINITION__FUNCTIONAL: | ||
279 | return isFunctional(); | ||
280 | case SolverLanguagePackage.PREDICATE_DEFINITION__ERROR: | ||
281 | return isError(); | ||
282 | } | ||
283 | return super.eGet(featureID, resolve, coreType); | ||
284 | } | ||
285 | |||
286 | /** | ||
287 | * <!-- begin-user-doc --> | ||
288 | * <!-- end-user-doc --> | ||
289 | * @generated | ||
290 | */ | ||
291 | @Override | ||
292 | public void eSet(int featureID, Object newValue) { | ||
293 | switch (featureID) { | ||
294 | case SolverLanguagePackage.PREDICATE_DEFINITION__HEAD: | ||
295 | setHead((Expression)newValue); | ||
296 | return; | ||
297 | case SolverLanguagePackage.PREDICATE_DEFINITION__BODY: | ||
298 | setBody((Expression)newValue); | ||
299 | return; | ||
300 | case SolverLanguagePackage.PREDICATE_DEFINITION__FUNCTIONAL: | ||
301 | setFunctional((Boolean)newValue); | ||
302 | return; | ||
303 | case SolverLanguagePackage.PREDICATE_DEFINITION__ERROR: | ||
304 | setError((Boolean)newValue); | ||
305 | return; | ||
306 | } | ||
307 | super.eSet(featureID, newValue); | ||
308 | } | ||
309 | |||
310 | /** | ||
311 | * <!-- begin-user-doc --> | ||
312 | * <!-- end-user-doc --> | ||
313 | * @generated | ||
314 | */ | ||
315 | @Override | ||
316 | public void eUnset(int featureID) { | ||
317 | switch (featureID) { | ||
318 | case SolverLanguagePackage.PREDICATE_DEFINITION__HEAD: | ||
319 | setHead((Expression)null); | ||
320 | return; | ||
321 | case SolverLanguagePackage.PREDICATE_DEFINITION__BODY: | ||
322 | setBody((Expression)null); | ||
323 | return; | ||
324 | case SolverLanguagePackage.PREDICATE_DEFINITION__FUNCTIONAL: | ||
325 | setFunctional(FUNCTIONAL_EDEFAULT); | ||
326 | return; | ||
327 | case SolverLanguagePackage.PREDICATE_DEFINITION__ERROR: | ||
328 | setError(ERROR_EDEFAULT); | ||
329 | return; | ||
330 | } | ||
331 | super.eUnset(featureID); | ||
332 | } | ||
333 | |||
334 | /** | ||
335 | * <!-- begin-user-doc --> | ||
336 | * <!-- end-user-doc --> | ||
337 | * @generated | ||
338 | */ | ||
339 | @Override | ||
340 | public boolean eIsSet(int featureID) { | ||
341 | switch (featureID) { | ||
342 | case SolverLanguagePackage.PREDICATE_DEFINITION__HEAD: | ||
343 | return head != null; | ||
344 | case SolverLanguagePackage.PREDICATE_DEFINITION__BODY: | ||
345 | return body != null; | ||
346 | case SolverLanguagePackage.PREDICATE_DEFINITION__FUNCTIONAL: | ||
347 | return functional != FUNCTIONAL_EDEFAULT; | ||
348 | case SolverLanguagePackage.PREDICATE_DEFINITION__ERROR: | ||
349 | return error != ERROR_EDEFAULT; | ||
350 | } | ||
351 | return super.eIsSet(featureID); | ||
352 | } | ||
353 | |||
354 | /** | ||
355 | * <!-- begin-user-doc --> | ||
356 | * <!-- end-user-doc --> | ||
357 | * @generated | ||
358 | */ | ||
359 | @Override | ||
360 | public String toString() { | ||
361 | if (eIsProxy()) return super.toString(); | ||
362 | |||
363 | StringBuilder result = new StringBuilder(super.toString()); | ||
364 | result.append(" (functional: "); | ||
365 | result.append(functional); | ||
366 | result.append(", error: "); | ||
367 | result.append(error); | ||
368 | result.append(')'); | ||
369 | return result.toString(); | ||
370 | } | ||
371 | |||
372 | } //PredicateDefinitionImpl | ||