aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util')
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java192
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java196
2 files changed, 388 insertions, 0 deletions
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java
new file mode 100644
index 00000000..9c5c8d2d
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java
@@ -0,0 +1,192 @@
1/**
2 */
3package modes3.util;
4
5import modes3.*;
6
7import org.eclipse.emf.common.notify.Adapter;
8import org.eclipse.emf.common.notify.Notifier;
9
10import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
11
12import org.eclipse.emf.ecore.EObject;
13
14/**
15 * <!-- begin-user-doc -->
16 * The <b>Adapter Factory</b> for the model.
17 * It provides an adapter <code>createXXX</code> method for each class of the model.
18 * <!-- end-user-doc -->
19 * @see modes3.Modes3Package
20 * @generated
21 */
22public class Modes3AdapterFactory extends AdapterFactoryImpl {
23 /**
24 * The cached model package.
25 * <!-- begin-user-doc -->
26 * <!-- end-user-doc -->
27 * @generated
28 */
29 protected static Modes3Package modelPackage;
30
31 /**
32 * Creates an instance of the adapter factory.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 public Modes3AdapterFactory() {
38 if (modelPackage == null) {
39 modelPackage = Modes3Package.eINSTANCE;
40 }
41 }
42
43 /**
44 * Returns whether this factory is applicable for the type of the object.
45 * <!-- begin-user-doc -->
46 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
47 * <!-- end-user-doc -->
48 * @return whether this factory is applicable for the type of the object.
49 * @generated
50 */
51 @Override
52 public boolean isFactoryForType(Object object) {
53 if (object == modelPackage) {
54 return true;
55 }
56 if (object instanceof EObject) {
57 return ((EObject)object).eClass().getEPackage() == modelPackage;
58 }
59 return false;
60 }
61
62 /**
63 * The switch that delegates to the <code>createXXX</code> methods.
64 * <!-- begin-user-doc -->
65 * <!-- end-user-doc -->
66 * @generated
67 */
68 protected Modes3Switch<Adapter> modelSwitch =
69 new Modes3Switch<Adapter>() {
70 @Override
71 public Adapter caseSegment(Segment object) {
72 return createSegmentAdapter();
73 }
74 @Override
75 public Adapter caseModes3ModelRoot(Modes3ModelRoot object) {
76 return createModes3ModelRootAdapter();
77 }
78 @Override
79 public Adapter caseTurnout(Turnout object) {
80 return createTurnoutAdapter();
81 }
82 @Override
83 public Adapter caseTrain(Train object) {
84 return createTrainAdapter();
85 }
86 @Override
87 public Adapter caseSimpleSegment(SimpleSegment object) {
88 return createSimpleSegmentAdapter();
89 }
90 @Override
91 public Adapter defaultCase(EObject object) {
92 return createEObjectAdapter();
93 }
94 };
95
96 /**
97 * Creates an adapter for the <code>target</code>.
98 * <!-- begin-user-doc -->
99 * <!-- end-user-doc -->
100 * @param target the object to adapt.
101 * @return the adapter for the <code>target</code>.
102 * @generated
103 */
104 @Override
105 public Adapter createAdapter(Notifier target) {
106 return modelSwitch.doSwitch((EObject)target);
107 }
108
109
110 /**
111 * Creates a new adapter for an object of class '{@link modes3.Segment <em>Segment</em>}'.
112 * <!-- begin-user-doc -->
113 * This default implementation returns null so that we can easily ignore cases;
114 * it's useful to ignore a case when inheritance will catch all the cases anyway.
115 * <!-- end-user-doc -->
116 * @return the new adapter.
117 * @see modes3.Segment
118 * @generated
119 */
120 public Adapter createSegmentAdapter() {
121 return null;
122 }
123
124 /**
125 * Creates a new adapter for an object of class '{@link modes3.Modes3ModelRoot <em>Model Root</em>}'.
126 * <!-- begin-user-doc -->
127 * This default implementation returns null so that we can easily ignore cases;
128 * it's useful to ignore a case when inheritance will catch all the cases anyway.
129 * <!-- end-user-doc -->
130 * @return the new adapter.
131 * @see modes3.Modes3ModelRoot
132 * @generated
133 */
134 public Adapter createModes3ModelRootAdapter() {
135 return null;
136 }
137
138 /**
139 * Creates a new adapter for an object of class '{@link modes3.Turnout <em>Turnout</em>}'.
140 * <!-- begin-user-doc -->
141 * This default implementation returns null so that we can easily ignore cases;
142 * it's useful to ignore a case when inheritance will catch all the cases anyway.
143 * <!-- end-user-doc -->
144 * @return the new adapter.
145 * @see modes3.Turnout
146 * @generated
147 */
148 public Adapter createTurnoutAdapter() {
149 return null;
150 }
151
152 /**
153 * Creates a new adapter for an object of class '{@link modes3.Train <em>Train</em>}'.
154 * <!-- begin-user-doc -->
155 * This default implementation returns null so that we can easily ignore cases;
156 * it's useful to ignore a case when inheritance will catch all the cases anyway.
157 * <!-- end-user-doc -->
158 * @return the new adapter.
159 * @see modes3.Train
160 * @generated
161 */
162 public Adapter createTrainAdapter() {
163 return null;
164 }
165
166 /**
167 * Creates a new adapter for an object of class '{@link modes3.SimpleSegment <em>Simple Segment</em>}'.
168 * <!-- begin-user-doc -->
169 * This default implementation returns null so that we can easily ignore cases;
170 * it's useful to ignore a case when inheritance will catch all the cases anyway.
171 * <!-- end-user-doc -->
172 * @return the new adapter.
173 * @see modes3.SimpleSegment
174 * @generated
175 */
176 public Adapter createSimpleSegmentAdapter() {
177 return null;
178 }
179
180 /**
181 * Creates a new adapter for the default case.
182 * <!-- begin-user-doc -->
183 * This default implementation returns null.
184 * <!-- end-user-doc -->
185 * @return the new adapter.
186 * @generated
187 */
188 public Adapter createEObjectAdapter() {
189 return null;
190 }
191
192} //Modes3AdapterFactory
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..0c28861a
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java
@@ -0,0 +1,196 @@
1/**
2 */
3package modes3.util;
4
5import modes3.*;
6
7import org.eclipse.emf.ecore.EObject;
8import org.eclipse.emf.ecore.EPackage;
9
10import 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 */
25public 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 case Modes3Package.SIMPLE_SEGMENT: {
95 SimpleSegment simpleSegment = (SimpleSegment)theEObject;
96 T result = caseSimpleSegment(simpleSegment);
97 if (result == null) result = caseSegment(simpleSegment);
98 if (result == null) result = defaultCase(theEObject);
99 return result;
100 }
101 default: return defaultCase(theEObject);
102 }
103 }
104
105 /**
106 * Returns the result of interpreting the object as an instance of '<em>Segment</em>'.
107 * <!-- begin-user-doc -->
108 * This implementation returns null;
109 * returning a non-null result will terminate the switch.
110 * <!-- end-user-doc -->
111 * @param object the target of the switch.
112 * @return the result of interpreting the object as an instance of '<em>Segment</em>'.
113 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
114 * @generated
115 */
116 public T caseSegment(Segment object) {
117 return null;
118 }
119
120 /**
121 * Returns the result of interpreting the object as an instance of '<em>Model Root</em>'.
122 * <!-- begin-user-doc -->
123 * This implementation returns null;
124 * returning a non-null result will terminate the switch.
125 * <!-- end-user-doc -->
126 * @param object the target of the switch.
127 * @return the result of interpreting the object as an instance of '<em>Model Root</em>'.
128 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
129 * @generated
130 */
131 public T caseModes3ModelRoot(Modes3ModelRoot object) {
132 return null;
133 }
134
135 /**
136 * Returns the result of interpreting the object as an instance of '<em>Turnout</em>'.
137 * <!-- begin-user-doc -->
138 * This implementation returns null;
139 * returning a non-null result will terminate the switch.
140 * <!-- end-user-doc -->
141 * @param object the target of the switch.
142 * @return the result of interpreting the object as an instance of '<em>Turnout</em>'.
143 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
144 * @generated
145 */
146 public T caseTurnout(Turnout object) {
147 return null;
148 }
149
150 /**
151 * Returns the result of interpreting the object as an instance of '<em>Train</em>'.
152 * <!-- begin-user-doc -->
153 * This implementation returns null;
154 * returning a non-null result will terminate the switch.
155 * <!-- end-user-doc -->
156 * @param object the target of the switch.
157 * @return the result of interpreting the object as an instance of '<em>Train</em>'.
158 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
159 * @generated
160 */
161 public T caseTrain(Train object) {
162 return null;
163 }
164
165 /**
166 * Returns the result of interpreting the object as an instance of '<em>Simple Segment</em>'.
167 * <!-- begin-user-doc -->
168 * This implementation returns null;
169 * returning a non-null result will terminate the switch.
170 * <!-- end-user-doc -->
171 * @param object the target of the switch.
172 * @return the result of interpreting the object as an instance of '<em>Simple Segment</em>'.
173 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
174 * @generated
175 */
176 public T caseSimpleSegment(SimpleSegment object) {
177 return null;
178 }
179
180 /**
181 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
182 * <!-- begin-user-doc -->
183 * This implementation returns null;
184 * returning a non-null result will terminate the switch, but this is the last case anyway.
185 * <!-- end-user-doc -->
186 * @param object the target of the switch.
187 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
188 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
189 * @generated
190 */
191 @Override
192 public T defaultCase(EObject object) {
193 return null;
194 }
195
196} //Modes3Switch