diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2020-08-06 16:07:16 +0200 |
---|---|---|
committer | Kristóf Marussy <marussy@mit.bme.hu> | 2020-08-06 16:07:16 +0200 |
commit | a620f07468780778bd55dcffc30245def37ece69 (patch) | |
tree | 57189ad9c8bf15211a05a3cd50ee90e90f434557 /Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java | |
parent | Fix time measurement (diff) | |
download | VIATRA-Generator-a620f07468780778bd55dcffc30245def37ece69.tar.gz VIATRA-Generator-a620f07468780778bd55dcffc30245def37ece69.tar.zst VIATRA-Generator-a620f07468780778bd55dcffc30245def37ece69.zip |
MoDeS3 unit propagation WIP
Diffstat (limited to 'Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java')
-rw-r--r-- | Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java | 174 |
1 files changed, 174 insertions, 0 deletions
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java new file mode 100644 index 00000000..5dab272b --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java | |||
@@ -0,0 +1,174 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.util; | ||
4 | |||
5 | import modes3.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.emf.ecore.EPackage; | ||
9 | |||
10 | import org.eclipse.emf.ecore.util.Switch; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * The <b>Switch</b> for the model's inheritance hierarchy. | ||
15 | * It supports the call {@link #doSwitch(EObject) doSwitch(object)} | ||
16 | * to invoke the <code>caseXXX</code> method for each class of the model, | ||
17 | * starting with the actual class of the object | ||
18 | * and proceeding up the inheritance hierarchy | ||
19 | * until a non-null result is returned, | ||
20 | * which is the result of the switch. | ||
21 | * <!-- end-user-doc --> | ||
22 | * @see modes3.Modes3Package | ||
23 | * @generated | ||
24 | */ | ||
25 | public class Modes3Switch<T> extends Switch<T> { | ||
26 | /** | ||
27 | * The cached model package | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | protected static Modes3Package modelPackage; | ||
33 | |||
34 | /** | ||
35 | * Creates an instance of the switch. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @generated | ||
39 | */ | ||
40 | public Modes3Switch() { | ||
41 | if (modelPackage == null) { | ||
42 | modelPackage = Modes3Package.eINSTANCE; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * Checks whether this is a switch for the given package. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @param ePackage the package in question. | ||
51 | * @return whether this is a switch for the given package. | ||
52 | * @generated | ||
53 | */ | ||
54 | @Override | ||
55 | protected boolean isSwitchFor(EPackage ePackage) { | ||
56 | return ePackage == modelPackage; | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @return the first non-null result returned by a <code>caseXXX</code> call. | ||
64 | * @generated | ||
65 | */ | ||
66 | @Override | ||
67 | protected T doSwitch(int classifierID, EObject theEObject) { | ||
68 | switch (classifierID) { | ||
69 | case Modes3Package.SEGMENT: { | ||
70 | Segment segment = (Segment)theEObject; | ||
71 | T result = caseSegment(segment); | ||
72 | if (result == null) result = defaultCase(theEObject); | ||
73 | return result; | ||
74 | } | ||
75 | case Modes3Package.MODES3_MODEL_ROOT: { | ||
76 | Modes3ModelRoot modes3ModelRoot = (Modes3ModelRoot)theEObject; | ||
77 | T result = caseModes3ModelRoot(modes3ModelRoot); | ||
78 | if (result == null) result = defaultCase(theEObject); | ||
79 | return result; | ||
80 | } | ||
81 | case Modes3Package.TURNOUT: { | ||
82 | Turnout turnout = (Turnout)theEObject; | ||
83 | T result = caseTurnout(turnout); | ||
84 | if (result == null) result = caseSegment(turnout); | ||
85 | if (result == null) result = defaultCase(theEObject); | ||
86 | return result; | ||
87 | } | ||
88 | case Modes3Package.TRAIN: { | ||
89 | Train train = (Train)theEObject; | ||
90 | T result = caseTrain(train); | ||
91 | if (result == null) result = defaultCase(theEObject); | ||
92 | return result; | ||
93 | } | ||
94 | default: return defaultCase(theEObject); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * Returns the result of interpreting the object as an instance of '<em>Segment</em>'. | ||
100 | * <!-- begin-user-doc --> | ||
101 | * This implementation returns null; | ||
102 | * returning a non-null result will terminate the switch. | ||
103 | * <!-- end-user-doc --> | ||
104 | * @param object the target of the switch. | ||
105 | * @return the result of interpreting the object as an instance of '<em>Segment</em>'. | ||
106 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
107 | * @generated | ||
108 | */ | ||
109 | public T caseSegment(Segment object) { | ||
110 | return null; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * Returns the result of interpreting the object as an instance of '<em>Model Root</em>'. | ||
115 | * <!-- begin-user-doc --> | ||
116 | * This implementation returns null; | ||
117 | * returning a non-null result will terminate the switch. | ||
118 | * <!-- end-user-doc --> | ||
119 | * @param object the target of the switch. | ||
120 | * @return the result of interpreting the object as an instance of '<em>Model Root</em>'. | ||
121 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
122 | * @generated | ||
123 | */ | ||
124 | public T caseModes3ModelRoot(Modes3ModelRoot object) { | ||
125 | return null; | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * Returns the result of interpreting the object as an instance of '<em>Turnout</em>'. | ||
130 | * <!-- begin-user-doc --> | ||
131 | * This implementation returns null; | ||
132 | * returning a non-null result will terminate the switch. | ||
133 | * <!-- end-user-doc --> | ||
134 | * @param object the target of the switch. | ||
135 | * @return the result of interpreting the object as an instance of '<em>Turnout</em>'. | ||
136 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
137 | * @generated | ||
138 | */ | ||
139 | public T caseTurnout(Turnout object) { | ||
140 | return null; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * Returns the result of interpreting the object as an instance of '<em>Train</em>'. | ||
145 | * <!-- begin-user-doc --> | ||
146 | * This implementation returns null; | ||
147 | * returning a non-null result will terminate the switch. | ||
148 | * <!-- end-user-doc --> | ||
149 | * @param object the target of the switch. | ||
150 | * @return the result of interpreting the object as an instance of '<em>Train</em>'. | ||
151 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
152 | * @generated | ||
153 | */ | ||
154 | public T caseTrain(Train object) { | ||
155 | return null; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
160 | * <!-- begin-user-doc --> | ||
161 | * This implementation returns null; | ||
162 | * returning a non-null result will terminate the switch, but this is the last case anyway. | ||
163 | * <!-- end-user-doc --> | ||
164 | * @param object the target of the switch. | ||
165 | * @return the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
166 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public T defaultCase(EObject object) { | ||
171 | return null; | ||
172 | } | ||
173 | |||
174 | } //Modes3Switch | ||