/*******************************************************************************
 * Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0
 *
 * Contributors:
 *     Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
 *     Pierre Virelizier (IRT Saint Exupéry)
 *     Julien Baclet (IRT Saint Exupéry)
 *     Pierre Gaufillet (IRT Saint Exupéry)
 *******************************************************************************/
/**
 */
package com.irtsaintexupery.pseim.seim.util;

import com.irtsaintexupery.pseim.seim.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> 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.
 * <!-- end-user-doc -->
 * @see com.irtsaintexupery.pseim.seim.SeimPackage
 * @generated
 */
public class SeimSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static SeimPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SeimSwitch() {
		if (modelPackage == null) {
			modelPackage = SeimPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
		case SeimPackage.COMPONENT: {
			Component component = (Component) theEObject;
			T result = caseComponent(component);
			if (result == null)
				result = caseGraphElement(component);
			if (result == null)
				result = caseElement(component);
			if (result == null)
				result = casePropertyHolder(component);
			if (result == null)
				result = caseNamedElement(component);
			if (result == null)
				result = caseIdentifiedElement(component);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.PORT: {
			Port port = (Port) theEObject;
			T result = casePort(port);
			if (result == null)
				result = caseBorderElement(port);
			if (result == null)
				result = caseElement(port);
			if (result == null)
				result = casePropertyHolder(port);
			if (result == null)
				result = caseNamedElement(port);
			if (result == null)
				result = caseIdentifiedElement(port);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.LINK: {
			Link link = (Link) theEObject;
			T result = caseLink(link);
			if (result == null)
				result = caseGraphElement(link);
			if (result == null)
				result = caseElement(link);
			if (result == null)
				result = casePropertyHolder(link);
			if (result == null)
				result = caseNamedElement(link);
			if (result == null)
				result = caseIdentifiedElement(link);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.GRAPH_ELEMENT: {
			GraphElement graphElement = (GraphElement) theEObject;
			T result = caseGraphElement(graphElement);
			if (result == null)
				result = caseElement(graphElement);
			if (result == null)
				result = casePropertyHolder(graphElement);
			if (result == null)
				result = caseNamedElement(graphElement);
			if (result == null)
				result = caseIdentifiedElement(graphElement);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.PROPERTY: {
			Property property = (Property) theEObject;
			T result = caseProperty(property);
			if (result == null)
				result = caseIdentifiedElement(property);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.BASIC_PROPERTY: {
			BasicProperty basicProperty = (BasicProperty) theEObject;
			T result = caseBasicProperty(basicProperty);
			if (result == null)
				result = caseProperty(basicProperty);
			if (result == null)
				result = caseIdentifiedElement(basicProperty);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.INTEGER_PROPERTY: {
			IntegerProperty integerProperty = (IntegerProperty) theEObject;
			T result = caseIntegerProperty(integerProperty);
			if (result == null)
				result = caseBasicProperty(integerProperty);
			if (result == null)
				result = caseProperty(integerProperty);
			if (result == null)
				result = caseIdentifiedElement(integerProperty);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.STRING_PROPERTY: {
			StringProperty stringProperty = (StringProperty) theEObject;
			T result = caseStringProperty(stringProperty);
			if (result == null)
				result = caseBasicProperty(stringProperty);
			if (result == null)
				result = caseProperty(stringProperty);
			if (result == null)
				result = caseIdentifiedElement(stringProperty);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.BOOLEAN_PROPERTY: {
			BooleanProperty booleanProperty = (BooleanProperty) theEObject;
			T result = caseBooleanProperty(booleanProperty);
			if (result == null)
				result = caseBasicProperty(booleanProperty);
			if (result == null)
				result = caseProperty(booleanProperty);
			if (result == null)
				result = caseIdentifiedElement(booleanProperty);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.REFERENCE_PROPERTY: {
			ReferenceProperty referenceProperty = (ReferenceProperty) theEObject;
			T result = caseReferenceProperty(referenceProperty);
			if (result == null)
				result = caseProperty(referenceProperty);
			if (result == null)
				result = caseIdentifiedElement(referenceProperty);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.PROPERTY_HOLDER: {
			PropertyHolder propertyHolder = (PropertyHolder) theEObject;
			T result = casePropertyHolder(propertyHolder);
			if (result == null)
				result = caseNamedElement(propertyHolder);
			if (result == null)
				result = caseIdentifiedElement(propertyHolder);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.NAMED_ELEMENT: {
			NamedElement namedElement = (NamedElement) theEObject;
			T result = caseNamedElement(namedElement);
			if (result == null)
				result = caseIdentifiedElement(namedElement);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.IDENTIFIED_ELEMENT: {
			IdentifiedElement identifiedElement = (IdentifiedElement) theEObject;
			T result = caseIdentifiedElement(identifiedElement);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.MODEL: {
			Model model = (Model) theEObject;
			T result = caseModel(model);
			if (result == null)
				result = casePropertyHolder(model);
			if (result == null)
				result = caseNamedElement(model);
			if (result == null)
				result = caseIdentifiedElement(model);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.BORDER_ELEMENT: {
			BorderElement borderElement = (BorderElement) theEObject;
			T result = caseBorderElement(borderElement);
			if (result == null)
				result = caseElement(borderElement);
			if (result == null)
				result = casePropertyHolder(borderElement);
			if (result == null)
				result = caseNamedElement(borderElement);
			if (result == null)
				result = caseIdentifiedElement(borderElement);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case SeimPackage.ELEMENT: {
			Element element = (Element) theEObject;
			T result = caseElement(element);
			if (result == null)
				result = casePropertyHolder(element);
			if (result == null)
				result = caseNamedElement(element);
			if (result == null)
				result = caseIdentifiedElement(element);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		default:
			return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Component</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Component</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseComponent(Component object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Port</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Port</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePort(Port object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Link</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Link</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseLink(Link object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Graph Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Graph Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseGraphElement(GraphElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Property</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Property</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseProperty(Property object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Basic Property</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Basic Property</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBasicProperty(BasicProperty object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Integer Property</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Integer Property</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseIntegerProperty(IntegerProperty object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>String Property</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>String Property</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseStringProperty(StringProperty object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Boolean Property</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Boolean Property</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBooleanProperty(BooleanProperty object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Reference Property</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Reference Property</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseReferenceProperty(ReferenceProperty object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Property Holder</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Property Holder</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePropertyHolder(PropertyHolder object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Named Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Named Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseNamedElement(NamedElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Identified Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Identified Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseIdentifiedElement(IdentifiedElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Model</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Model</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseModel(Model object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Border Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Border Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBorderElement(BorderElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseElement(Element object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //SeimSwitch
