aboutsummaryrefslogtreecommitdiffstats
path: root/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-06-27 14:22:40 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-06-27 14:22:40 +0200
commit07719e927f9d398765e661c84fd8778cefb39083 (patch)
tree9652080f7e580f09a0763a3e258348dea6e02684 /language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java
parentAdd enum support (diff)
downloadrefinery-07719e927f9d398765e661c84fd8778cefb39083.tar.gz
refinery-07719e927f9d398765e661c84fd8778cefb39083.tar.zst
refinery-07719e927f9d398765e661c84fd8778cefb39083.zip
Simplify project layout
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java')
-rw-r--r--language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java247
1 files changed, 247 insertions, 0 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java
new file mode 100644
index 00000000..f7d045ca
--- /dev/null
+++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java
@@ -0,0 +1,247 @@
1/**
2 */
3package org.eclipse.viatra.solver.language.model.problem.impl;
4
5import org.eclipse.emf.common.notify.Notification;
6import org.eclipse.emf.common.notify.NotificationChain;
7
8import org.eclipse.emf.ecore.EClass;
9import org.eclipse.emf.ecore.InternalEObject;
10
11import org.eclipse.emf.ecore.impl.ENotificationImpl;
12import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
13
14import org.eclipse.viatra.solver.language.model.problem.Argument;
15import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable;
16import org.eclipse.viatra.solver.language.model.problem.ProblemPackage;
17import org.eclipse.viatra.solver.language.model.problem.VariableOrNode;
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#getVariableOrNode <em>Variable Or Node</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 */
33public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argument {
34 /**
35 * The cached value of the '{@link #getVariableOrNode() <em>Variable Or Node</em>}' reference.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @see #getVariableOrNode()
39 * @generated
40 * @ordered
41 */
42 protected VariableOrNode variableOrNode;
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 VariableOrNode getVariableOrNode() {
79 if (variableOrNode != null && variableOrNode.eIsProxy()) {
80 InternalEObject oldVariableOrNode = (InternalEObject) variableOrNode;
81 variableOrNode = (VariableOrNode) eResolveProxy(oldVariableOrNode);
82 if (variableOrNode != oldVariableOrNode) {
83 if (eNotificationRequired())
84 eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ARGUMENT__VARIABLE_OR_NODE,
85 oldVariableOrNode, variableOrNode));
86 }
87 }
88 return variableOrNode;
89 }
90
91 /**
92 * <!-- begin-user-doc -->
93 * <!-- end-user-doc -->
94 * @generated
95 */
96 public VariableOrNode basicGetVariableOrNode() {
97 return variableOrNode;
98 }
99
100 /**
101 * <!-- begin-user-doc -->
102 * <!-- end-user-doc -->
103 * @generated
104 */
105 public void setVariableOrNode(VariableOrNode newVariableOrNode) {
106 VariableOrNode oldVariableOrNode = variableOrNode;
107 variableOrNode = newVariableOrNode;
108 if (eNotificationRequired())
109 eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ARGUMENT__VARIABLE_OR_NODE,
110 oldVariableOrNode, variableOrNode));
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_OR_NODE:
186 if (resolve)
187 return getVariableOrNode();
188 return basicGetVariableOrNode();
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_OR_NODE:
204 setVariableOrNode((VariableOrNode) 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_OR_NODE:
222 setVariableOrNode((VariableOrNode) 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_OR_NODE:
240 return variableOrNode != null;
241 case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE:
242 return singletonVariable != null;
243 }
244 return super.eIsSet(featureID);
245 }
246
247} //ArgumentImpl