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.StructType;
  import com.intel.llvm.ireditor.lLVM_IR.Type;
  
  import java.util.Collection;
  
  import org.eclipse.emf.common.notify.Notification;
  import org.eclipse.emf.common.notify.NotificationChain;
  
  import org.eclipse.emf.common.util.EList;
  
  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;
  
  import org.eclipse.emf.ecore.util.EObjectContainmentEList;
  import org.eclipse.emf.ecore.util.InternalEList;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Struct Type</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.StructTypeImpl#getTypes <em>Types</em>}</li>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.StructTypeImpl#getPacked <em>Packed</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class StructTypeImpl extends MinimalEObjectImpl.Container implements StructType
  {
    /**
     * The cached value of the '{@link #getTypes() <em>Types</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getTypes()
     * @generated
     * @ordered
     */
    protected EList<Type> types;
  
    /**
     * The default value of the '{@link #getPacked() <em>Packed</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getPacked()
     * @generated
     * @ordered
     */
    protected static final String PACKED_EDEFAULT = null;
  
    /**
     * The cached value of the '{@link #getPacked() <em>Packed</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getPacked()
     * @generated
     * @ordered
     */
    protected String packed = PACKED_EDEFAULT;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected StructTypeImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.STRUCT_TYPE;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<Type> getTypes()
    {
      if (types == null)
      {
        types = new EObjectContainmentEList<Type>(Type.class, this, LLVM_IRPackage.STRUCT_TYPE__TYPES);
      }
      return types;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getPacked()
    {
      return packed;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setPacked(String newPacked)
    {
      String oldPacked = packed;
      packed = newPacked;
      if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.STRUCT_TYPE__PACKED, oldPacked, packed));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.STRUCT_TYPE__TYPES:
          return ((InternalEList<?>)getTypes()).basicRemove(otherEnd, 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.STRUCT_TYPE__TYPES:
          return getTypes();
        case LLVM_IRPackage.STRUCT_TYPE__PACKED:
          return getPacked();
      }
      return super.eGet(featureID, resolve, coreType);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @SuppressWarnings("unchecked")
    @Override
    public void eSet(int featureID, Object newValue)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.STRUCT_TYPE__TYPES:
          getTypes().clear();
          getTypes().addAll((Collection<? extends Type>)newValue);
          return;
        case LLVM_IRPackage.STRUCT_TYPE__PACKED:
          setPacked((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.STRUCT_TYPE__TYPES:
          getTypes().clear();
          return;
        case LLVM_IRPackage.STRUCT_TYPE__PACKED:
          setPacked(PACKED_EDEFAULT);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.STRUCT_TYPE__TYPES:
          return types != null && !types.isEmpty();
        case LLVM_IRPackage.STRUCT_TYPE__PACKED:
          return PACKED_EDEFAULT == null ? packed != null : !PACKED_EDEFAULT.equals(packed);
      }
      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(" (packed: ");
      result.append(packed);
      result.append(')');
      return result.toString();
    }
  
  } //StructTypeImpl
  