/*******************************************************************************
 * Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the LGPL 3.0
 * which accompanies this distribution, and is available at
 * https://www.gnu.org/licenses/lgpl-3.0-standalone.html
 *
 * Contributors:
 *     Faiez Zalila - initial API and implementation and/or initial documentation
 *******************************************************************************/
/**
 */
package com.irtsaintexupery.fiacre.instance.fiacreinstance.util;

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

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

import com.irtsaintexupery.fiacre.instance.fiacreinstance.*;

/**
 * <!-- 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.fiacre.instance.fiacreinstance.FiacreinstancePackage
 * @generated
 */
public class FiacreinstanceSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static FiacreinstancePackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FiacreinstanceSwitch() {
		if (modelPackage == null) {
			modelPackage = FiacreinstancePackage.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 FiacreinstancePackage.INSTANCE_MODEL: {
				InstanceModel instanceModel = (InstanceModel)theEObject;
				T result = caseInstanceModel(instanceModel);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.STATEMENT_BLOCK: {
				StatementBlock statementBlock = (StatementBlock)theEObject;
				T result = caseStatementBlock(statementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.EXECUTED_STATEMENT_BLOCK: {
				ExecutedStatementBlock executedStatementBlock = (ExecutedStatementBlock)theEObject;
				T result = caseExecutedStatementBlock(executedStatementBlock);
				if (result == null) result = caseStatementBlock(executedStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.EXECUTABLE_STATEMENT_BLOCK: {
				ExecutableStatementBlock executableStatementBlock = (ExecutableStatementBlock)theEObject;
				T result = caseExecutableStatementBlock(executableStatementBlock);
				if (result == null) result = caseStatementBlock(executableStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.FIREABLE_STATEMENT_BLOCK: {
				FireableStatementBlock fireableStatementBlock = (FireableStatementBlock)theEObject;
				T result = caseFireableStatementBlock(fireableStatementBlock);
				if (result == null) result = caseExecutableStatementBlock(fireableStatementBlock);
				if (result == null) result = caseStatementBlock(fireableStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.ENABLED_STATEMENT_BLOCK: {
				EnabledStatementBlock enabledStatementBlock = (EnabledStatementBlock)theEObject;
				T result = caseEnabledStatementBlock(enabledStatementBlock);
				if (result == null) result = caseExecutableStatementBlock(enabledStatementBlock);
				if (result == null) result = caseStatementBlock(enabledStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.BLOCK_INSTANCE: {
				BlockInstance blockInstance = (BlockInstance)theEObject;
				T result = caseBlockInstance(blockInstance);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.COMPOSITION_INSTANCE: {
				CompositionInstance compositionInstance = (CompositionInstance)theEObject;
				T result = caseCompositionInstance(compositionInstance);
				if (result == null) result = caseBlockInstance(compositionInstance);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.DECLARATION_INSTANCE: {
				DeclarationInstance declarationInstance = (DeclarationInstance)theEObject;
				T result = caseDeclarationInstance(declarationInstance);
				if (result == null) result = caseBlockInstance(declarationInstance);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.COMPONENT_DECLARATION_INSTANCE: {
				ComponentDeclarationInstance componentDeclarationInstance = (ComponentDeclarationInstance)theEObject;
				T result = caseComponentDeclarationInstance(componentDeclarationInstance);
				if (result == null) result = caseDeclarationInstance(componentDeclarationInstance);
				if (result == null) result = caseBlockInstance(componentDeclarationInstance);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.PROCESS_DECLARATION_INSTANCE: {
				ProcessDeclarationInstance processDeclarationInstance = (ProcessDeclarationInstance)theEObject;
				T result = caseProcessDeclarationInstance(processDeclarationInstance);
				if (result == null) result = caseDeclarationInstance(processDeclarationInstance);
				if (result == null) result = caseBlockInstance(processDeclarationInstance);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.INSTANCE_STATEMENT_BLOCK: {
				InstanceStatementBlock instanceStatementBlock = (InstanceStatementBlock)theEObject;
				T result = caseInstanceStatementBlock(instanceStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.INSTANCE_EXECUTED_STATEMENT_BLOCK: {
				InstanceExecutedStatementBlock instanceExecutedStatementBlock = (InstanceExecutedStatementBlock)theEObject;
				T result = caseInstanceExecutedStatementBlock(instanceExecutedStatementBlock);
				if (result == null) result = caseInstanceStatementBlock(instanceExecutedStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.INSTANCE_EXECUTABLE_STATEMENT_BLOCK: {
				InstanceExecutableStatementBlock instanceExecutableStatementBlock = (InstanceExecutableStatementBlock)theEObject;
				T result = caseInstanceExecutableStatementBlock(instanceExecutableStatementBlock);
				if (result == null) result = caseInstanceStatementBlock(instanceExecutableStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.INSTANCE_FIREABLE_STATEMENT_BLOCK: {
				InstanceFireableStatementBlock instanceFireableStatementBlock = (InstanceFireableStatementBlock)theEObject;
				T result = caseInstanceFireableStatementBlock(instanceFireableStatementBlock);
				if (result == null) result = caseInstanceExecutableStatementBlock(instanceFireableStatementBlock);
				if (result == null) result = caseInstanceStatementBlock(instanceFireableStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.INSTANCE_ENABLED_STATEMENT_BLOCK: {
				InstanceEnabledStatementBlock instanceEnabledStatementBlock = (InstanceEnabledStatementBlock)theEObject;
				T result = caseInstanceEnabledStatementBlock(instanceEnabledStatementBlock);
				if (result == null) result = caseInstanceExecutableStatementBlock(instanceEnabledStatementBlock);
				if (result == null) result = caseInstanceStatementBlock(instanceEnabledStatementBlock);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case FiacreinstancePackage.VARIABLE_DECLARATION_INSTANCE: {
				VariableDeclarationInstance variableDeclarationInstance = (VariableDeclarationInstance)theEObject;
				T result = caseVariableDeclarationInstance(variableDeclarationInstance);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Instance 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>Instance Model</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInstanceModel(InstanceModel object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Statement Block</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>Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseStatementBlock(StatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Executed Statement Block</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>Executed Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseExecutedStatementBlock(ExecutedStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Executable Statement Block</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>Executable Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseExecutableStatementBlock(ExecutableStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Fireable Statement Block</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>Fireable Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseFireableStatementBlock(FireableStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Enabled Statement Block</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>Enabled Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseEnabledStatementBlock(EnabledStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Block Instance</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>Block Instance</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBlockInstance(BlockInstance object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Composition Instance</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>Composition Instance</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseCompositionInstance(CompositionInstance object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Declaration Instance</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>Declaration Instance</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseDeclarationInstance(DeclarationInstance object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Component Declaration Instance</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 Declaration Instance</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseComponentDeclarationInstance(ComponentDeclarationInstance object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Process Declaration Instance</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>Process Declaration Instance</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseProcessDeclarationInstance(ProcessDeclarationInstance object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Instance Statement Block</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>Instance Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInstanceStatementBlock(InstanceStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Instance Executed Statement Block</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>Instance Executed Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInstanceExecutedStatementBlock(InstanceExecutedStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Instance Executable Statement Block</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>Instance Executable Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInstanceExecutableStatementBlock(InstanceExecutableStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Instance Fireable Statement Block</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>Instance Fireable Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInstanceFireableStatementBlock(InstanceFireableStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Instance Enabled Statement Block</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>Instance Enabled Statement Block</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInstanceEnabledStatementBlock(InstanceEnabledStatementBlock object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Variable Declaration Instance</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>Variable Declaration Instance</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseVariableDeclarationInstance(VariableDeclarationInstance 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;
	}

} //FiacreinstanceSwitch
