content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.Function;
  import com.intel.llvm.ireditor.lLVM_IR.FunctionHeader;
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  
  import org.eclipse.emf.common.notify.Notification;
  import org.eclipse.emf.common.notify.NotificationChain;
  
  import org.eclipse.emf.ecore.EClass;
  import org.eclipse.emf.ecore.InternalEObject;
  
  import org.eclipse.emf.ecore.impl.ENotificationImpl;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Function</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.FunctionImpl#getHeader <em>Header</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class FunctionImpl extends GlobalValueImpl implements Function
  {
    /**
     * The cached value of the '{@link #getHeader() <em>Header</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getHeader()
     * @generated
     * @ordered
     */
    protected FunctionHeader header;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected FunctionImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.FUNCTION;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public FunctionHeader getHeader()
    {
      return header;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetHeader(FunctionHeader newHeader, NotificationChain msgs)
    {
      FunctionHeader oldHeader = header;
      header = newHeader;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.FUNCTION__HEADER, oldHeader, newHeader);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setHeader(FunctionHeader newHeader)
    {
      if (newHeader != header)
      {
        NotificationChain msgs = null;
        if (header != null)
          msgs = ((InternalEObject)header).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.FUNCTION__HEADER, null, msgs);
        if (newHeader != null)
          msgs = ((InternalEObject)newHeader).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.FUNCTION__HEADER, null, msgs);
        msgs = basicSetHeader(newHeader, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.FUNCTION__HEADER, newHeader, newHeader));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.FUNCTION__HEADER:
          return basicSetHeader(null, msgs);
      }
      return super.eInverseRemove(otherEnd, featureID, msgs);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.FUNCTION__HEADER:
          return getHeader();
      }
      return super.eGet(featureID, resolve, coreType);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.FUNCTION__HEADER:
          setHeader((FunctionHeader)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.FUNCTION__HEADER:
          setHeader((FunctionHeader)null);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.FUNCTION__HEADER:
          return header != null;
      }
      return super.eIsSet(featureID);
    }
  
  } //FunctionImpl
  