/** */ package hu.bme.mit.inf.dslreasoner.smtLanguage.impl; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTCardinalityConstraint; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDeclaration; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDefinition; import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTModelResult; import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguagePackage; import java.util.Collection; 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.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'SMT Model Result'. * *

* The following features are implemented: *

*

* * @generated */ public class SMTModelResultImpl extends SMTResultImpl implements SMTModelResult { /** * The cached value of the '{@link #getNewFunctionDeclarations() New Function Declarations}' containment reference list. * * * @see #getNewFunctionDeclarations() * @generated * @ordered */ protected EList newFunctionDeclarations; /** * The cached value of the '{@link #getTypeDefinitions() Type Definitions}' containment reference list. * * * @see #getTypeDefinitions() * @generated * @ordered */ protected EList typeDefinitions; /** * The cached value of the '{@link #getNewFunctionDefinitions() New Function Definitions}' containment reference list. * * * @see #getNewFunctionDefinitions() * @generated * @ordered */ protected EList newFunctionDefinitions; /** * * * @generated */ protected SMTModelResultImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SmtLanguagePackage.Literals.SMT_MODEL_RESULT; } /** * * * @generated */ public EList getNewFunctionDeclarations() { if (newFunctionDeclarations == null) { newFunctionDeclarations = new EObjectContainmentEList(SMTFunctionDeclaration.class, this, SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DECLARATIONS); } return newFunctionDeclarations; } /** * * * @generated */ public EList getTypeDefinitions() { if (typeDefinitions == null) { typeDefinitions = new EObjectContainmentEList(SMTCardinalityConstraint.class, this, SmtLanguagePackage.SMT_MODEL_RESULT__TYPE_DEFINITIONS); } return typeDefinitions; } /** * * * @generated */ public EList getNewFunctionDefinitions() { if (newFunctionDefinitions == null) { newFunctionDefinitions = new EObjectContainmentEList(SMTFunctionDefinition.class, this, SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DEFINITIONS); } return newFunctionDefinitions; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DECLARATIONS: return ((InternalEList)getNewFunctionDeclarations()).basicRemove(otherEnd, msgs); case SmtLanguagePackage.SMT_MODEL_RESULT__TYPE_DEFINITIONS: return ((InternalEList)getTypeDefinitions()).basicRemove(otherEnd, msgs); case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DEFINITIONS: return ((InternalEList)getNewFunctionDefinitions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DECLARATIONS: return getNewFunctionDeclarations(); case SmtLanguagePackage.SMT_MODEL_RESULT__TYPE_DEFINITIONS: return getTypeDefinitions(); case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DEFINITIONS: return getNewFunctionDefinitions(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DECLARATIONS: getNewFunctionDeclarations().clear(); getNewFunctionDeclarations().addAll((Collection)newValue); return; case SmtLanguagePackage.SMT_MODEL_RESULT__TYPE_DEFINITIONS: getTypeDefinitions().clear(); getTypeDefinitions().addAll((Collection)newValue); return; case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DEFINITIONS: getNewFunctionDefinitions().clear(); getNewFunctionDefinitions().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DECLARATIONS: getNewFunctionDeclarations().clear(); return; case SmtLanguagePackage.SMT_MODEL_RESULT__TYPE_DEFINITIONS: getTypeDefinitions().clear(); return; case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DEFINITIONS: getNewFunctionDefinitions().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DECLARATIONS: return newFunctionDeclarations != null && !newFunctionDeclarations.isEmpty(); case SmtLanguagePackage.SMT_MODEL_RESULT__TYPE_DEFINITIONS: return typeDefinitions != null && !typeDefinitions.isEmpty(); case SmtLanguagePackage.SMT_MODEL_RESULT__NEW_FUNCTION_DEFINITIONS: return newFunctionDefinitions != null && !newFunctionDefinitions.isEmpty(); } return super.eIsSet(featureID); } } //SMTModelResultImpl