diff options
author | 2020-04-28 20:43:04 +0200 | |
---|---|---|
committer | 2020-04-28 20:43:04 +0200 | |
commit | 8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe (patch) | |
tree | d525bef75519f364d637e0779f8e63d4199dee31 /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ParameterImpl.java | |
parent | check expressions are mapped to WF constraints (diff) | |
download | VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.gz VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.zst VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.zip |
initial commit
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ParameterImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ParameterImpl.java | 271 |
1 files changed, 271 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ParameterImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ParameterImpl.java new file mode 100644 index 00000000..6281c4bc --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ParameterImpl.java | |||
@@ -0,0 +1,271 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
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 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
14 | |||
15 | import org.eclipse.viatra.solver.language.solverLanguage.Parameter; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
17 | import org.eclipse.viatra.solver.language.solverLanguage.Symbol; | ||
18 | import org.eclipse.viatra.solver.language.solverLanguage.Variable; | ||
19 | |||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * An implementation of the model object '<em><b>Parameter</b></em>'. | ||
23 | * <!-- end-user-doc --> | ||
24 | * <p> | ||
25 | * The following features are implemented: | ||
26 | * </p> | ||
27 | * <ul> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ParameterImpl#getVariable <em>Variable</em>}</li> | ||
29 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ParameterImpl#getType <em>Type</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class ParameterImpl extends MinimalEObjectImpl.Container implements Parameter | ||
35 | { | ||
36 | /** | ||
37 | * The cached value of the '{@link #getVariable() <em>Variable</em>}' containment reference. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @see #getVariable() | ||
41 | * @generated | ||
42 | * @ordered | ||
43 | */ | ||
44 | protected Variable variable; | ||
45 | |||
46 | /** | ||
47 | * The cached value of the '{@link #getType() <em>Type</em>}' containment reference. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @see #getType() | ||
51 | * @generated | ||
52 | * @ordered | ||
53 | */ | ||
54 | protected Symbol type; | ||
55 | |||
56 | /** | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @generated | ||
60 | */ | ||
61 | protected ParameterImpl() | ||
62 | { | ||
63 | super(); | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | @Override | ||
72 | protected EClass eStaticClass() | ||
73 | { | ||
74 | return SolverLanguagePackage.Literals.PARAMETER; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public Variable getVariable() | ||
84 | { | ||
85 | return variable; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public NotificationChain basicSetVariable(Variable newVariable, NotificationChain msgs) | ||
94 | { | ||
95 | Variable oldVariable = variable; | ||
96 | variable = newVariable; | ||
97 | if (eNotificationRequired()) | ||
98 | { | ||
99 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PARAMETER__VARIABLE, oldVariable, newVariable); | ||
100 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
101 | } | ||
102 | return msgs; | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public void setVariable(Variable newVariable) | ||
112 | { | ||
113 | if (newVariable != variable) | ||
114 | { | ||
115 | NotificationChain msgs = null; | ||
116 | if (variable != null) | ||
117 | msgs = ((InternalEObject)variable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PARAMETER__VARIABLE, null, msgs); | ||
118 | if (newVariable != null) | ||
119 | msgs = ((InternalEObject)newVariable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PARAMETER__VARIABLE, null, msgs); | ||
120 | msgs = basicSetVariable(newVariable, msgs); | ||
121 | if (msgs != null) msgs.dispatch(); | ||
122 | } | ||
123 | else if (eNotificationRequired()) | ||
124 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PARAMETER__VARIABLE, newVariable, newVariable)); | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
132 | @Override | ||
133 | public Symbol getType() | ||
134 | { | ||
135 | return type; | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | public NotificationChain basicSetType(Symbol newType, NotificationChain msgs) | ||
144 | { | ||
145 | Symbol oldType = type; | ||
146 | type = newType; | ||
147 | if (eNotificationRequired()) | ||
148 | { | ||
149 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PARAMETER__TYPE, oldType, newType); | ||
150 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
151 | } | ||
152 | return msgs; | ||
153 | } | ||
154 | |||
155 | /** | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @generated | ||
159 | */ | ||
160 | @Override | ||
161 | public void setType(Symbol newType) | ||
162 | { | ||
163 | if (newType != type) | ||
164 | { | ||
165 | NotificationChain msgs = null; | ||
166 | if (type != null) | ||
167 | msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PARAMETER__TYPE, null, msgs); | ||
168 | if (newType != null) | ||
169 | msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PARAMETER__TYPE, null, msgs); | ||
170 | msgs = basicSetType(newType, msgs); | ||
171 | if (msgs != null) msgs.dispatch(); | ||
172 | } | ||
173 | else if (eNotificationRequired()) | ||
174 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PARAMETER__TYPE, newType, newType)); | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | @Override | ||
183 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
184 | { | ||
185 | switch (featureID) | ||
186 | { | ||
187 | case SolverLanguagePackage.PARAMETER__VARIABLE: | ||
188 | return basicSetVariable(null, msgs); | ||
189 | case SolverLanguagePackage.PARAMETER__TYPE: | ||
190 | return basicSetType(null, msgs); | ||
191 | } | ||
192 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | @Override | ||
201 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
202 | { | ||
203 | switch (featureID) | ||
204 | { | ||
205 | case SolverLanguagePackage.PARAMETER__VARIABLE: | ||
206 | return getVariable(); | ||
207 | case SolverLanguagePackage.PARAMETER__TYPE: | ||
208 | return getType(); | ||
209 | } | ||
210 | return super.eGet(featureID, resolve, coreType); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public void eSet(int featureID, Object newValue) | ||
220 | { | ||
221 | switch (featureID) | ||
222 | { | ||
223 | case SolverLanguagePackage.PARAMETER__VARIABLE: | ||
224 | setVariable((Variable)newValue); | ||
225 | return; | ||
226 | case SolverLanguagePackage.PARAMETER__TYPE: | ||
227 | setType((Symbol)newValue); | ||
228 | return; | ||
229 | } | ||
230 | super.eSet(featureID, newValue); | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * <!-- begin-user-doc --> | ||
235 | * <!-- end-user-doc --> | ||
236 | * @generated | ||
237 | */ | ||
238 | @Override | ||
239 | public void eUnset(int featureID) | ||
240 | { | ||
241 | switch (featureID) | ||
242 | { | ||
243 | case SolverLanguagePackage.PARAMETER__VARIABLE: | ||
244 | setVariable((Variable)null); | ||
245 | return; | ||
246 | case SolverLanguagePackage.PARAMETER__TYPE: | ||
247 | setType((Symbol)null); | ||
248 | return; | ||
249 | } | ||
250 | super.eUnset(featureID); | ||
251 | } | ||
252 | |||
253 | /** | ||
254 | * <!-- begin-user-doc --> | ||
255 | * <!-- end-user-doc --> | ||
256 | * @generated | ||
257 | */ | ||
258 | @Override | ||
259 | public boolean eIsSet(int featureID) | ||
260 | { | ||
261 | switch (featureID) | ||
262 | { | ||
263 | case SolverLanguagePackage.PARAMETER__VARIABLE: | ||
264 | return variable != null; | ||
265 | case SolverLanguagePackage.PARAMETER__TYPE: | ||
266 | return type != null; | ||
267 | } | ||
268 | return super.eIsSet(featureID); | ||
269 | } | ||
270 | |||
271 | } //ParameterImpl | ||