diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/DefaultDefinitionImpl.java | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/DefaultDefinitionImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/DefaultDefinitionImpl.java | 247 |
1 files changed, 247 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/DefaultDefinitionImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/DefaultDefinitionImpl.java new file mode 100644 index 00000000..f1ad7bea --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/DefaultDefinitionImpl.java | |||
@@ -0,0 +1,247 @@ | |||
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.Call; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.DefaultDefinition; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.Expression; | ||
17 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Default Definition</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.solverLanguage.impl.DefaultDefinitionImpl#getHead <em>Head</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.DefaultDefinitionImpl#getRange <em>Range</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class DefaultDefinitionImpl extends StatementImpl implements DefaultDefinition { | ||
34 | /** | ||
35 | * The cached value of the '{@link #getHead() <em>Head</em>}' containment reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getHead() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected Call head; | ||
43 | |||
44 | /** | ||
45 | * The cached value of the '{@link #getRange() <em>Range</em>}' containment reference. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getRange() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected Expression range; | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | protected DefaultDefinitionImpl() { | ||
60 | super(); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | @Override | ||
69 | protected EClass eStaticClass() { | ||
70 | return SolverLanguagePackage.Literals.DEFAULT_DEFINITION; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | @Override | ||
79 | public Call getHead() { | ||
80 | return head; | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @generated | ||
87 | */ | ||
88 | public NotificationChain basicSetHead(Call newHead, NotificationChain msgs) { | ||
89 | Call oldHead = head; | ||
90 | head = newHead; | ||
91 | if (eNotificationRequired()) { | ||
92 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.DEFAULT_DEFINITION__HEAD, oldHead, newHead); | ||
93 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
94 | } | ||
95 | return msgs; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @Override | ||
104 | public void setHead(Call newHead) { | ||
105 | if (newHead != head) { | ||
106 | NotificationChain msgs = null; | ||
107 | if (head != null) | ||
108 | msgs = ((InternalEObject)head).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.DEFAULT_DEFINITION__HEAD, null, msgs); | ||
109 | if (newHead != null) | ||
110 | msgs = ((InternalEObject)newHead).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.DEFAULT_DEFINITION__HEAD, null, msgs); | ||
111 | msgs = basicSetHead(newHead, msgs); | ||
112 | if (msgs != null) msgs.dispatch(); | ||
113 | } | ||
114 | else if (eNotificationRequired()) | ||
115 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.DEFAULT_DEFINITION__HEAD, newHead, newHead)); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public Expression getRange() { | ||
125 | return range; | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @generated | ||
132 | */ | ||
133 | public NotificationChain basicSetRange(Expression newRange, NotificationChain msgs) { | ||
134 | Expression oldRange = range; | ||
135 | range = newRange; | ||
136 | if (eNotificationRequired()) { | ||
137 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.DEFAULT_DEFINITION__RANGE, oldRange, newRange); | ||
138 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
139 | } | ||
140 | return msgs; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
149 | public void setRange(Expression newRange) { | ||
150 | if (newRange != range) { | ||
151 | NotificationChain msgs = null; | ||
152 | if (range != null) | ||
153 | msgs = ((InternalEObject)range).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.DEFAULT_DEFINITION__RANGE, null, msgs); | ||
154 | if (newRange != null) | ||
155 | msgs = ((InternalEObject)newRange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.DEFAULT_DEFINITION__RANGE, null, msgs); | ||
156 | msgs = basicSetRange(newRange, msgs); | ||
157 | if (msgs != null) msgs.dispatch(); | ||
158 | } | ||
159 | else if (eNotificationRequired()) | ||
160 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.DEFAULT_DEFINITION__RANGE, newRange, newRange)); | ||
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 SolverLanguagePackage.DEFAULT_DEFINITION__HEAD: | ||
172 | return basicSetHead(null, msgs); | ||
173 | case SolverLanguagePackage.DEFAULT_DEFINITION__RANGE: | ||
174 | return basicSetRange(null, msgs); | ||
175 | } | ||
176 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * <!-- begin-user-doc --> | ||
181 | * <!-- end-user-doc --> | ||
182 | * @generated | ||
183 | */ | ||
184 | @Override | ||
185 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
186 | switch (featureID) { | ||
187 | case SolverLanguagePackage.DEFAULT_DEFINITION__HEAD: | ||
188 | return getHead(); | ||
189 | case SolverLanguagePackage.DEFAULT_DEFINITION__RANGE: | ||
190 | return getRange(); | ||
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 SolverLanguagePackage.DEFAULT_DEFINITION__HEAD: | ||
204 | setHead((Call)newValue); | ||
205 | return; | ||
206 | case SolverLanguagePackage.DEFAULT_DEFINITION__RANGE: | ||
207 | setRange((Expression)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 SolverLanguagePackage.DEFAULT_DEFINITION__HEAD: | ||
222 | setHead((Call)null); | ||
223 | return; | ||
224 | case SolverLanguagePackage.DEFAULT_DEFINITION__RANGE: | ||
225 | setRange((Expression)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 SolverLanguagePackage.DEFAULT_DEFINITION__HEAD: | ||
240 | return head != null; | ||
241 | case SolverLanguagePackage.DEFAULT_DEFINITION__RANGE: | ||
242 | return range != null; | ||
243 | } | ||
244 | return super.eIsSet(featureID); | ||
245 | } | ||
246 | |||
247 | } //DefaultDefinitionImpl | ||