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 --- .../solverLanguage/impl/FunctorDefinitonImpl.java | 255 +++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/FunctorDefinitonImpl.java (limited to 'Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/FunctorDefinitonImpl.java') diff --git a/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/FunctorDefinitonImpl.java b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/FunctorDefinitonImpl.java new file mode 100644 index 00000000..0dff447f --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/FunctorDefinitonImpl.java @@ -0,0 +1,255 @@ +/** + */ +package org.eclipse.viatra.solver.language.solverLanguage.impl; + +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.viatra.solver.language.solverLanguage.Expression; +import org.eclipse.viatra.solver.language.solverLanguage.FunctorDefiniton; +import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; + +/** + * + * An implementation of the model object 'Functor Definiton'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public abstract class FunctorDefinitonImpl extends StatementImpl implements FunctorDefiniton { + /** + * The cached value of the '{@link #getHead() Head}' containment reference. + * + * + * @see #getHead() + * @generated + * @ordered + */ + protected Expression head; + + /** + * The cached value of the '{@link #getBody() Body}' containment reference. + * + * + * @see #getBody() + * @generated + * @ordered + */ + protected Expression body; + + /** + * + * + * @generated + */ + protected FunctorDefinitonImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SolverLanguagePackage.Literals.FUNCTOR_DEFINITON; + } + + /** + * + * + * @generated + */ + public Expression getHead() { + return head; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetHead(Expression newHead, NotificationChain msgs) { + Expression oldHead = head; + head = newHead; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD, oldHead, newHead); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setHead(Expression newHead) { + if (newHead != head) { + NotificationChain msgs = null; + if (head != null) + msgs = ((InternalEObject) head).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD, null, msgs); + if (newHead != null) + msgs = ((InternalEObject) newHead).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD, null, msgs); + msgs = basicSetHead(newHead, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD, + newHead, newHead)); + } + + /** + * + * + * @generated + */ + public Expression getBody() { + return body; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { + Expression oldBody = body; + body = newBody; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + SolverLanguagePackage.FUNCTOR_DEFINITON__BODY, oldBody, newBody); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setBody(Expression newBody) { + if (newBody != body) { + NotificationChain msgs = null; + if (body != null) + msgs = ((InternalEObject) body).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.FUNCTOR_DEFINITON__BODY, null, msgs); + if (newBody != null) + msgs = ((InternalEObject) newBody).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.FUNCTOR_DEFINITON__BODY, null, msgs); + msgs = basicSetBody(newBody, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.FUNCTOR_DEFINITON__BODY, + newBody, newBody)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD: + return basicSetHead(null, msgs); + case SolverLanguagePackage.FUNCTOR_DEFINITON__BODY: + return basicSetBody(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD: + return getHead(); + case SolverLanguagePackage.FUNCTOR_DEFINITON__BODY: + return getBody(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD: + setHead((Expression) newValue); + return; + case SolverLanguagePackage.FUNCTOR_DEFINITON__BODY: + setBody((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD: + setHead((Expression) null); + return; + case SolverLanguagePackage.FUNCTOR_DEFINITON__BODY: + setBody((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SolverLanguagePackage.FUNCTOR_DEFINITON__HEAD: + return head != null; + case SolverLanguagePackage.FUNCTOR_DEFINITON__BODY: + return body != null; + } + return super.eIsSet(featureID); + } + +} //FunctorDefinitonImpl -- cgit v1.2.3-70-g09d2