content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.Instruction_alloca;
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  import com.intel.llvm.ireditor.lLVM_IR.Type;
  import com.intel.llvm.ireditor.lLVM_IR.TypedValue;
  
  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>Instruction alloca</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.Instruction_allocaImpl#getType <em>Type</em>}</li>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.Instruction_allocaImpl#getNumElements <em>Num Elements</em>}</li>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.Instruction_allocaImpl#getAlignment <em>Alignment</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class Instruction_allocaImpl extends MemoryInstructionImpl implements Instruction_alloca
  {
    /**
     * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getType()
     * @generated
     * @ordered
     */
    protected Type type;
  
    /**
     * The cached value of the '{@link #getNumElements() <em>Num Elements</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getNumElements()
     * @generated
     * @ordered
     */
    protected TypedValue numElements;
  
    /**
     * The default value of the '{@link #getAlignment() <em>Alignment</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getAlignment()
     * @generated
     * @ordered
     */
    protected static final String ALIGNMENT_EDEFAULT = null;
  
    /**
     * The cached value of the '{@link #getAlignment() <em>Alignment</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getAlignment()
     * @generated
     * @ordered
     */
    protected String alignment = ALIGNMENT_EDEFAULT;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected Instruction_allocaImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.INSTRUCTION_ALLOCA;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Type getType()
    {
      return type;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetType(Type newType, NotificationChain msgs)
    {
      Type oldType = type;
      type = newType;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE, oldType, newType);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setType(Type newType)
    {
      if (newType != type)
      {
        NotificationChain msgs = null;
        if (type != null)
          msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE, null, msgs);
        if (newType != null)
          msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE, null, msgs);
        msgs = basicSetType(newType, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE, newType, newType));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public TypedValue getNumElements()
    {
      return numElements;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetNumElements(TypedValue newNumElements, NotificationChain msgs)
    {
      TypedValue oldNumElements = numElements;
      numElements = newNumElements;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS, oldNumElements, newNumElements);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setNumElements(TypedValue newNumElements)
    {
      if (newNumElements != numElements)
      {
        NotificationChain msgs = null;
        if (numElements != null)
          msgs = ((InternalEObject)numElements).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS, null, msgs);
        if (newNumElements != null)
          msgs = ((InternalEObject)newNumElements).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS, null, msgs);
        msgs = basicSetNumElements(newNumElements, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS, newNumElements, newNumElements));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getAlignment()
    {
      return alignment;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setAlignment(String newAlignment)
    {
      String oldAlignment = alignment;
      alignment = newAlignment;
      if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.INSTRUCTION_ALLOCA__ALIGNMENT, oldAlignment, alignment));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE:
          return basicSetType(null, msgs);
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS:
          return basicSetNumElements(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.INSTRUCTION_ALLOCA__TYPE:
          return getType();
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS:
          return getNumElements();
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__ALIGNMENT:
          return getAlignment();
      }
      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.INSTRUCTION_ALLOCA__TYPE:
          setType((Type)newValue);
          return;
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS:
          setNumElements((TypedValue)newValue);
          return;
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__ALIGNMENT:
          setAlignment((String)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE:
          setType((Type)null);
          return;
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS:
          setNumElements((TypedValue)null);
          return;
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__ALIGNMENT:
          setAlignment(ALIGNMENT_EDEFAULT);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__TYPE:
          return type != null;
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__NUM_ELEMENTS:
          return numElements != null;
        case LLVM_IRPackage.INSTRUCTION_ALLOCA__ALIGNMENT:
          return ALIGNMENT_EDEFAULT == null ? alignment != null : !ALIGNMENT_EDEFAULT.equals(alignment);
      }
      return super.eIsSet(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String toString()
    {
      if (eIsProxy()) return super.toString();
  
      StringBuffer result = new StringBuffer(super.toString());
      result.append(" (alignment: ");
      result.append(alignment);
      result.append(')');
      return result.toString();
    }
  
  } //Instruction_allocaImpl
  