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