From 42c58bbeead1dae09c51f47abc8e10dfbb9c3f9f Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 23 Jun 2020 15:17:00 +0200 Subject: New configuration language parser WIP --- .../impl/ExternFunctionDeclarationImpl.java | 159 +++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternFunctionDeclarationImpl.java (limited to 'Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternFunctionDeclarationImpl.java') diff --git a/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternFunctionDeclarationImpl.java b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternFunctionDeclarationImpl.java new file mode 100644 index 00000000..83ec9f13 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternFunctionDeclarationImpl.java @@ -0,0 +1,159 @@ +/** + */ +package org.eclipse.viatra.solver.language.solverLanguage.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.solverLanguage.ExternFunctionDeclaration; +import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; +import org.eclipse.viatra.solver.language.solverLanguage.Symbol; + +/** + * + * An implementation of the model object 'Extern Function Declaration'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class ExternFunctionDeclarationImpl extends ExternFunctorDeclarationImpl implements ExternFunctionDeclaration { + /** + * The cached value of the '{@link #getResultType() Result Type}' reference. + * + * + * @see #getResultType() + * @generated + * @ordered + */ + protected Symbol resultType; + + /** + * + * + * @generated + */ + protected ExternFunctionDeclarationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SolverLanguagePackage.Literals.EXTERN_FUNCTION_DECLARATION; + } + + /** + * + * + * @generated + */ + public Symbol getResultType() { + if (resultType != null && resultType.eIsProxy()) { + InternalEObject oldResultType = (InternalEObject) resultType; + resultType = (Symbol) eResolveProxy(oldResultType); + if (resultType != oldResultType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + SolverLanguagePackage.EXTERN_FUNCTION_DECLARATION__RESULT_TYPE, oldResultType, resultType)); + } + } + return resultType; + } + + /** + * + * + * @generated + */ + public Symbol basicGetResultType() { + return resultType; + } + + /** + * + * + * @generated + */ + public void setResultType(Symbol newResultType) { + Symbol oldResultType = resultType; + resultType = newResultType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + SolverLanguagePackage.EXTERN_FUNCTION_DECLARATION__RESULT_TYPE, oldResultType, resultType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SolverLanguagePackage.EXTERN_FUNCTION_DECLARATION__RESULT_TYPE: + if (resolve) + return getResultType(); + return basicGetResultType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SolverLanguagePackage.EXTERN_FUNCTION_DECLARATION__RESULT_TYPE: + setResultType((Symbol) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SolverLanguagePackage.EXTERN_FUNCTION_DECLARATION__RESULT_TYPE: + setResultType((Symbol) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SolverLanguagePackage.EXTERN_FUNCTION_DECLARATION__RESULT_TYPE: + return resultType != null; + } + return super.eIsSet(featureID); + } + +} //ExternFunctionDeclarationImpl -- cgit v1.2.3-70-g09d2