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