content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  import com.intel.llvm.ireditor.lLVM_IR.Type;
  import com.intel.llvm.ireditor.lLVM_IR.VectorType;
  
  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>Vector Type</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.VectorTypeImpl#getSize <em>Size</em>}</li>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.VectorTypeImpl#getElemType <em>Elem Type</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class VectorTypeImpl extends MinimalEObjectImpl.Container implements VectorType
  {
    /**
     * The default value of the '{@link #getSize() <em>Size</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getSize()
     * @generated
     * @ordered
     */
    protected static final String SIZE_EDEFAULT = null;
  
    /**
     * The cached value of the '{@link #getSize() <em>Size</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getSize()
     * @generated
     * @ordered
     */
    protected String size = SIZE_EDEFAULT;
  
    /**
     * The cached value of the '{@link #getElemType() <em>Elem Type</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getElemType()
     * @generated
     * @ordered
     */
    protected Type elemType;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected VectorTypeImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.VECTOR_TYPE;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getSize()
    {
      return size;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setSize(String newSize)
    {
      String oldSize = size;
      size = newSize;
      if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.VECTOR_TYPE__SIZE, oldSize, size));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Type getElemType()
    {
      return elemType;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetElemType(Type newElemType, NotificationChain msgs)
    {
      Type oldElemType = elemType;
      elemType = newElemType;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE, oldElemType, newElemType);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setElemType(Type newElemType)
    {
      if (newElemType != elemType)
      {
        NotificationChain msgs = null;
        if (elemType != null)
          msgs = ((InternalEObject)elemType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE, null, msgs);
        if (newElemType != null)
          msgs = ((InternalEObject)newElemType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE, null, msgs);
        msgs = basicSetElemType(newElemType, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE, newElemType, newElemType));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE:
          return basicSetElemType(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.VECTOR_TYPE__SIZE:
          return getSize();
        case LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE:
          return getElemType();
      }
      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.VECTOR_TYPE__SIZE:
          setSize((String)newValue);
          return;
        case LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE:
          setElemType((Type)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.VECTOR_TYPE__SIZE:
          setSize(SIZE_EDEFAULT);
          return;
        case LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE:
          setElemType((Type)null);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.VECTOR_TYPE__SIZE:
          return SIZE_EDEFAULT == null ? size != null : !SIZE_EDEFAULT.equals(size);
        case LLVM_IRPackage.VECTOR_TYPE__ELEM_TYPE:
          return elemType != null;
      }
      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(" (size: ");
      result.append(size);
      result.append(')');
      return result.toString();
    }
  
  } //VectorTypeImpl
  