content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.Argument;
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  import com.intel.llvm.ireditor.lLVM_IR.ParameterType;
  import com.intel.llvm.ireditor.lLVM_IR.ValueRef;
  
  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;
  import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Argument</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.ArgumentImpl#getType <em>Type</em>}</li>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.ArgumentImpl#getRef <em>Ref</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argument
  {
    /**
     * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getType()
     * @generated
     * @ordered
     */
    protected ParameterType type;
  
    /**
     * The cached value of the '{@link #getRef() <em>Ref</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getRef()
     * @generated
     * @ordered
     */
    protected ValueRef ref;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected ArgumentImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.ARGUMENT;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public ParameterType getType()
    {
      return type;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetType(ParameterType newType, NotificationChain msgs)
    {
      ParameterType oldType = type;
      type = newType;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.ARGUMENT__TYPE, oldType, newType);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setType(ParameterType newType)
    {
      if (newType != type)
      {
        NotificationChain msgs = null;
        if (type != null)
          msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.ARGUMENT__TYPE, null, msgs);
        if (newType != null)
          msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.ARGUMENT__TYPE, null, msgs);
        msgs = basicSetType(newType, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.ARGUMENT__TYPE, newType, newType));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public ValueRef getRef()
    {
      return ref;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetRef(ValueRef newRef, NotificationChain msgs)
    {
      ValueRef oldRef = ref;
      ref = newRef;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.ARGUMENT__REF, oldRef, newRef);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setRef(ValueRef newRef)
    {
      if (newRef != ref)
      {
        NotificationChain msgs = null;
        if (ref != null)
          msgs = ((InternalEObject)ref).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.ARGUMENT__REF, null, msgs);
        if (newRef != null)
          msgs = ((InternalEObject)newRef).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.ARGUMENT__REF, null, msgs);
        msgs = basicSetRef(newRef, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.ARGUMENT__REF, newRef, newRef));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.ARGUMENT__TYPE:
          return basicSetType(null, msgs);
        case LLVM_IRPackage.ARGUMENT__REF:
          return basicSetRef(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.ARGUMENT__TYPE:
          return getType();
        case LLVM_IRPackage.ARGUMENT__REF:
          return getRef();
      }
      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.ARGUMENT__TYPE:
          setType((ParameterType)newValue);
          return;
        case LLVM_IRPackage.ARGUMENT__REF:
          setRef((ValueRef)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.ARGUMENT__TYPE:
          setType((ParameterType)null);
          return;
        case LLVM_IRPackage.ARGUMENT__REF:
          setRef((ValueRef)null);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.ARGUMENT__TYPE:
          return type != null;
        case LLVM_IRPackage.ARGUMENT__REF:
          return ref != null;
      }
      return super.eIsSet(featureID);
    }
  
  } //ArgumentImpl
  