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