diff options
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/InterpretationImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/InterpretationImpl.java | 246 |
1 files changed, 246 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/InterpretationImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/InterpretationImpl.java new file mode 100644 index 00000000..fab8335a --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/InterpretationImpl.java | |||
@@ -0,0 +1,246 @@ | |||
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.Interpretation; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Interpretation</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.InterpretationImpl#getBody <em>Body</em>}</li> | ||
27 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.InterpretationImpl#getRange <em>Range</em>}</li> | ||
28 | * </ul> | ||
29 | * | ||
30 | * @generated | ||
31 | */ | ||
32 | public class InterpretationImpl extends StatementImpl implements Interpretation { | ||
33 | /** | ||
34 | * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getBody() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected Expression body; | ||
42 | |||
43 | /** | ||
44 | * The cached value of the '{@link #getRange() <em>Range</em>}' containment reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getRange() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected Expression range; | ||
52 | |||
53 | /** | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @generated | ||
57 | */ | ||
58 | protected InterpretationImpl() { | ||
59 | super(); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | @Override | ||
68 | protected EClass eStaticClass() { | ||
69 | return SolverLanguagePackage.Literals.INTERPRETATION; | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @generated | ||
76 | */ | ||
77 | @Override | ||
78 | public Expression getBody() { | ||
79 | return body; | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { | ||
88 | Expression oldBody = body; | ||
89 | body = newBody; | ||
90 | if (eNotificationRequired()) { | ||
91 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.INTERPRETATION__BODY, oldBody, newBody); | ||
92 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
93 | } | ||
94 | return msgs; | ||
95 | } | ||
96 | |||
97 | /** | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | @Override | ||
103 | public void setBody(Expression newBody) { | ||
104 | if (newBody != body) { | ||
105 | NotificationChain msgs = null; | ||
106 | if (body != null) | ||
107 | msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.INTERPRETATION__BODY, null, msgs); | ||
108 | if (newBody != null) | ||
109 | msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.INTERPRETATION__BODY, null, msgs); | ||
110 | msgs = basicSetBody(newBody, msgs); | ||
111 | if (msgs != null) msgs.dispatch(); | ||
112 | } | ||
113 | else if (eNotificationRequired()) | ||
114 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.INTERPRETATION__BODY, newBody, newBody)); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @generated | ||
121 | */ | ||
122 | @Override | ||
123 | public Expression getRange() { | ||
124 | return range; | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
132 | public NotificationChain basicSetRange(Expression newRange, NotificationChain msgs) { | ||
133 | Expression oldRange = range; | ||
134 | range = newRange; | ||
135 | if (eNotificationRequired()) { | ||
136 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.INTERPRETATION__RANGE, oldRange, newRange); | ||
137 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
138 | } | ||
139 | return msgs; | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | @Override | ||
148 | public void setRange(Expression newRange) { | ||
149 | if (newRange != range) { | ||
150 | NotificationChain msgs = null; | ||
151 | if (range != null) | ||
152 | msgs = ((InternalEObject)range).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.INTERPRETATION__RANGE, null, msgs); | ||
153 | if (newRange != null) | ||
154 | msgs = ((InternalEObject)newRange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.INTERPRETATION__RANGE, null, msgs); | ||
155 | msgs = basicSetRange(newRange, msgs); | ||
156 | if (msgs != null) msgs.dispatch(); | ||
157 | } | ||
158 | else if (eNotificationRequired()) | ||
159 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.INTERPRETATION__RANGE, newRange, newRange)); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | @Override | ||
168 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
169 | switch (featureID) { | ||
170 | case SolverLanguagePackage.INTERPRETATION__BODY: | ||
171 | return basicSetBody(null, msgs); | ||
172 | case SolverLanguagePackage.INTERPRETATION__RANGE: | ||
173 | return basicSetRange(null, msgs); | ||
174 | } | ||
175 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
176 | } | ||
177 | |||
178 | /** | ||
179 | * <!-- begin-user-doc --> | ||
180 | * <!-- end-user-doc --> | ||
181 | * @generated | ||
182 | */ | ||
183 | @Override | ||
184 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
185 | switch (featureID) { | ||
186 | case SolverLanguagePackage.INTERPRETATION__BODY: | ||
187 | return getBody(); | ||
188 | case SolverLanguagePackage.INTERPRETATION__RANGE: | ||
189 | return getRange(); | ||
190 | } | ||
191 | return super.eGet(featureID, resolve, coreType); | ||
192 | } | ||
193 | |||
194 | /** | ||
195 | * <!-- begin-user-doc --> | ||
196 | * <!-- end-user-doc --> | ||
197 | * @generated | ||
198 | */ | ||
199 | @Override | ||
200 | public void eSet(int featureID, Object newValue) { | ||
201 | switch (featureID) { | ||
202 | case SolverLanguagePackage.INTERPRETATION__BODY: | ||
203 | setBody((Expression)newValue); | ||
204 | return; | ||
205 | case SolverLanguagePackage.INTERPRETATION__RANGE: | ||
206 | setRange((Expression)newValue); | ||
207 | return; | ||
208 | } | ||
209 | super.eSet(featureID, newValue); | ||
210 | } | ||
211 | |||
212 | /** | ||
213 | * <!-- begin-user-doc --> | ||
214 | * <!-- end-user-doc --> | ||
215 | * @generated | ||
216 | */ | ||
217 | @Override | ||
218 | public void eUnset(int featureID) { | ||
219 | switch (featureID) { | ||
220 | case SolverLanguagePackage.INTERPRETATION__BODY: | ||
221 | setBody((Expression)null); | ||
222 | return; | ||
223 | case SolverLanguagePackage.INTERPRETATION__RANGE: | ||
224 | setRange((Expression)null); | ||
225 | return; | ||
226 | } | ||
227 | super.eUnset(featureID); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @Override | ||
236 | public boolean eIsSet(int featureID) { | ||
237 | switch (featureID) { | ||
238 | case SolverLanguagePackage.INTERPRETATION__BODY: | ||
239 | return body != null; | ||
240 | case SolverLanguagePackage.INTERPRETATION__RANGE: | ||
241 | return range != null; | ||
242 | } | ||
243 | return super.eIsSet(featureID); | ||
244 | } | ||
245 | |||
246 | } //InterpretationImpl | ||