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