/** * generated by Xtext 2.23.0 */ package fr.n7.game.util; import fr.n7.game.*; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; /** * * The Switch for the model's inheritance hierarchy. * It supports the call {@link #doSwitch(EObject) doSwitch(object)} * to invoke the caseXXX method for each class of the model, * starting with the actual class of the object * and proceeding up the inheritance hierarchy * until a non-null result is returned, * which is the result of the switch. * * @see fr.n7.game.GamePackage * @generated */ public class GameSwitch extends Switch { /** * The cached model package * * * @generated */ protected static GamePackage modelPackage; /** * Creates an instance of the switch. * * * @generated */ public GameSwitch() { if (modelPackage == null) { modelPackage = GamePackage.eINSTANCE; } } /** * Checks whether this is a switch for the given package. * * * @param ePackage the package in question. * @return whether this is a switch for the given package. * @generated */ @Override protected boolean isSwitchFor(EPackage ePackage) { return ePackage == modelPackage; } /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * * * @return the first non-null result returned by a caseXXX call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case GamePackage.JEU: { Jeu jeu = (Jeu)theEObject; T result = caseJeu(jeu); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.EXPLORATEUR: { Explorateur explorateur = (Explorateur)theEObject; T result = caseExplorateur(explorateur); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.TERRITOIRE: { Territoire territoire = (Territoire)theEObject; T result = caseTerritoire(territoire); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.LIEU: { Lieu lieu = (Lieu)theEObject; T result = caseLieu(lieu); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CHEMIN: { Chemin chemin = (Chemin)theEObject; T result = caseChemin(chemin); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.OBJET: { Objet objet = (Objet)theEObject; T result = caseObjet(objet); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.TRANSFORMATION: { Transformation transformation = (Transformation)theEObject; T result = caseTransformation(transformation); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CONNAISSANCE: { Connaissance connaissance = (Connaissance)theEObject; T result = caseConnaissance(connaissance); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.PERSONNE: { Personne personne = (Personne)theEObject; T result = casePersonne(personne); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.INTERACTION: { Interaction interaction = (Interaction)theEObject; T result = caseInteraction(interaction); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.ACTION: { Action action = (Action)theEObject; T result = caseAction(action); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.DESCRIPTION: { Description description = (Description)theEObject; T result = caseDescription(description); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CONDITION: { Condition condition = (Condition)theEObject; T result = caseCondition(condition); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CONDITION_ET: { ConditionEt conditionEt = (ConditionEt)theEObject; T result = caseConditionEt(conditionEt); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CONDITION_TEST: { ConditionTest conditionTest = (ConditionTest)theEObject; T result = caseConditionTest(conditionTest); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CONDITION_CONNAISSANCE: { ConditionConnaissance conditionConnaissance = (ConditionConnaissance)theEObject; T result = caseConditionConnaissance(conditionConnaissance); if (result == null) result = caseConditionTest(conditionConnaissance); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.NOT_CONDITION_CONNAISSANCE: { NOTConditionConnaissance notConditionConnaissance = (NOTConditionConnaissance)theEObject; T result = caseNOTConditionConnaissance(notConditionConnaissance); if (result == null) result = caseConditionTest(notConditionConnaissance); if (result == null) result = defaultCase(theEObject); return result; } case GamePackage.CONDITION_OBJET: { ConditionObjet conditionObjet = (ConditionObjet)theEObject; T result = caseConditionObjet(conditionObjet); if (result == null) result = caseConditionTest(conditionObjet); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of 'Jeu'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Jeu'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseJeu(Jeu object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Explorateur'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Explorateur'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseExplorateur(Explorateur object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Territoire'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Territoire'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTerritoire(Territoire object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Lieu'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Lieu'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseLieu(Lieu object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Chemin'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Chemin'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseChemin(Chemin object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Objet'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Objet'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseObjet(Objet object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Transformation'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Transformation'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTransformation(Transformation object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Connaissance'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Connaissance'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConnaissance(Connaissance object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Personne'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Personne'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePersonne(Personne object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Interaction'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Interaction'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseInteraction(Interaction object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Action'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Action'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAction(Action object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Description'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Description'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDescription(Description object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Condition'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Condition'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseCondition(Condition object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Condition Et'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Condition Et'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConditionEt(ConditionEt object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Condition Test'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Condition Test'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConditionTest(ConditionTest object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Condition Connaissance'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Condition Connaissance'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConditionConnaissance(ConditionConnaissance object) { return null; } /** * Returns the result of interpreting the object as an instance of 'NOT Condition Connaissance'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'NOT Condition Connaissance'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseNOTConditionConnaissance(NOTConditionConnaissance object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Condition Objet'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Condition Objet'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConditionObjet(ConditionObjet object) { return null; } /** * Returns the result of interpreting the object as an instance of 'EObject'. * * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ @Override public T defaultCase(EObject object) { return null; } } //GameSwitch