content: /**
   * <copyright>
   * </copyright>
   *
   * $Id$
   */
  package oscfg.util;
  
  import java.util.List;
  
  import org.eclipse.emf.ecore.EClass;
  import org.eclipse.emf.ecore.EObject;
  
  import org.eclipse.emf.ecore.EPackage;
  import org.eclipse.emf.ecore.util.Switch;
  import oscfg.*;
  
  /**
   * <!-- 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 oscfg.OscfgPackage
   * @generated
   */
  public class OscfgSwitch<T> extends Switch<T> {
  	/**
  	 * The cached model package
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	protected static OscfgPackage modelPackage;
  
  	/**
  	 * Creates an instance of the switch.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	public OscfgSwitch() {
  		if (modelPackage == null) {
  			modelPackage = OscfgPackage.eINSTANCE;
  		}
  	}
  
  	/**
  	 * Checks whether this is a switch for the given package.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @parameter 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 OscfgPackage.CALLBACK_FUNCTION: {
  				CallbackFunction callbackFunction = (CallbackFunction)theEObject;
  				T result = caseCallbackFunction(callbackFunction);
  				if (result == null) result = caseNamedObject(callbackFunction);
  				if (result == null) result = casePoster(callbackFunction);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.CONFIGURATION: {
  				Configuration configuration = (Configuration)theEObject;
  				T result = caseConfiguration(configuration);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.DOCUMENT_ROOT: {
  				DocumentRoot documentRoot = (DocumentRoot)theEObject;
  				T result = caseDocumentRoot(documentRoot);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.HW_COUNTER: {
  				HWCounter hwCounter = (HWCounter)theEObject;
  				T result = caseHWCounter(hwCounter);
  				if (result == null) result = caseNamedObject(hwCounter);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.ISR: {
  				ISR isr = (ISR)theEObject;
  				T result = caseISR(isr);
  				if (result == null) result = caseBaseTask(isr);
  				if (result == null) result = caseNamedObject(isr);
  				if (result == null) result = casePoster(isr);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.MESSAGE: {
  				Message message = (Message)theEObject;
  				T result = caseMessage(message);
  				if (result == null) result = caseNamedObject(message);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.MUTEX: {
  				Mutex mutex = (Mutex)theEObject;
  				T result = caseMutex(mutex);
  				if (result == null) result = caseNamedObject(mutex);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.MODULE: {
  				Module module = (Module)theEObject;
  				T result = caseModule(module);
  				if (result == null) result = caseNamedObject(module);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.SW_TIMER: {
  				SWTimer swTimer = (SWTimer)theEObject;
  				T result = caseSWTimer(swTimer);
  				if (result == null) result = caseNamedObject(swTimer);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.TASK: {
  				Task task = (Task)theEObject;
  				T result = caseTask(task);
  				if (result == null) result = caseBaseTask(task);
  				if (result == null) result = caseNamedObject(task);
  				if (result == null) result = casePoster(task);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.BASE_TASK: {
  				BaseTask baseTask = (BaseTask)theEObject;
  				T result = caseBaseTask(baseTask);
  				if (result == null) result = caseNamedObject(baseTask);
  				if (result == null) result = casePoster(baseTask);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.INTERRUPT_SOURCE: {
  				InterruptSource interruptSource = (InterruptSource)theEObject;
  				T result = caseInterruptSource(interruptSource);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.OS: {
  				OS os = (OS)theEObject;
  				T result = caseOS(os);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.COOPERATIVE_GROUP: {
  				CooperativeGroup cooperativeGroup = (CooperativeGroup)theEObject;
  				T result = caseCooperativeGroup(cooperativeGroup);
  				if (result == null) result = caseNamedObject(cooperativeGroup);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.NAMED_OBJECT: {
  				NamedObject namedObject = (NamedObject)theEObject;
  				T result = caseNamedObject(namedObject);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			case OscfgPackage.POSTER: {
  				Poster poster = (Poster)theEObject;
  				T result = casePoster(poster);
  				if (result == null) result = defaultCase(theEObject);
  				return result;
  			}
  			default: return defaultCase(theEObject);
  		}
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Callback Function</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>Callback Function</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseCallbackFunction(CallbackFunction object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Configuration</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>Configuration</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseConfiguration(Configuration object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Document Root</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>Document Root</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseDocumentRoot(DocumentRoot object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>HW Counter</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>HW Counter</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseHWCounter(HWCounter object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>ISR</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>ISR</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseISR(ISR object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Message</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>Message</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseMessage(Message object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Mutex</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>Mutex</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseMutex(Mutex object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Module</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>Module</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseModule(Module object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>SW Timer</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>SW Timer</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseSWTimer(SWTimer object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Task</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>Task</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseTask(Task object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Base Task</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>Base Task</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseBaseTask(BaseTask object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Interrupt Source</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>Interrupt Source</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseInterruptSource(InterruptSource object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>OS</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>OS</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseOS(OS object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Cooperative Group</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>Cooperative Group</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseCooperativeGroup(CooperativeGroup object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Named Object</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 Object</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T caseNamedObject(NamedObject object) {
  		return null;
  	}
  
  	/**
  	 * Returns the result of interpreting the object as an instance of '<em>Poster</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>Poster</em>'.
  	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
  	 * @generated
  	 */
  	public T casePoster(Poster 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;
  	}
  
  } //OscfgSwitch
  