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