/** */ package de.hftstuttgart.buildingphysics.util; import de.hftstuttgart.buildingphysics.*; 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 de.hftstuttgart.buildingphysics.BuildingPhysicsPackage * @generated */ public class BuildingPhysicsSwitch extends Switch { /** * The cached model package * * * @generated */ protected static BuildingPhysicsPackage modelPackage; /** * Creates an instance of the switch. * * * @generated */ public BuildingPhysicsSwitch() { if (modelPackage == null) { modelPackage = BuildingPhysicsPackage.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 BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG: { BuildingPhysicsCatalog buildingPhysicsCatalog = (BuildingPhysicsCatalog) theEObject; T result = caseBuildingPhysicsCatalog(buildingPhysicsCatalog); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.WINDOW_TYPE: { WindowType windowType = (WindowType) theEObject; T result = caseWindowType(windowType); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.CATALOG: { Catalog catalog = (Catalog) theEObject; T result = caseCatalog(catalog); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.WINDOW_CATALOG: { WindowCatalog windowCatalog = (WindowCatalog) theEObject; T result = caseWindowCatalog(windowCatalog); if (result == null) result = caseCatalog(windowCatalog); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.MATERIAL_CATALOG: { MaterialCatalog materialCatalog = (MaterialCatalog) theEObject; T result = caseMaterialCatalog(materialCatalog); if (result == null) result = caseCatalog(materialCatalog); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.MATERIAL_CATEGORY: { MaterialCategory materialCategory = (MaterialCategory) theEObject; T result = caseMaterialCategory(materialCategory); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.MATERIAL: { Material material = (Material) theEObject; T result = caseMaterial(material); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.CONSTRUCTION_CATEGORY: { ConstructionCategory constructionCategory = (ConstructionCategory) theEObject; T result = caseConstructionCategory(constructionCategory); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.MOUNTING: { Mounting mounting = (Mounting) theEObject; T result = caseMounting(mounting); if (result == null) result = defaultCase(theEObject); return result; } case BuildingPhysicsPackage.LAYER: { Layer layer = (Layer) theEObject; T result = caseLayer(layer); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of 'Catalog'. * * 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 'Catalog'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBuildingPhysicsCatalog(BuildingPhysicsCatalog object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Window Type'. * * 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 'Window Type'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseWindowType(WindowType object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Catalog'. * * 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 'Catalog'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseCatalog(Catalog object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Window Catalog'. * * 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 'Window Catalog'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseWindowCatalog(WindowCatalog object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Material Catalog'. * * 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 'Material Catalog'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMaterialCatalog(MaterialCatalog object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Material Category'. * * 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 'Material Category'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMaterialCategory(MaterialCategory object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Material'. * * 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 'Material'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMaterial(Material object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Construction Category'. * * 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 'Construction Category'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConstructionCategory(ConstructionCategory object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Mounting'. * * 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 'Mounting'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMounting(Mounting object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Layer'. * * 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 'Layer'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseLayer(Layer 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; } } //BuildingPhysicsSwitch