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