Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java')
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java413
1 files changed, 413 insertions, 0 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java
new file mode 100644
index 00000000000..3266a71fd01
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java
@@ -0,0 +1,413 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.RobotML.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.RobotML.RobotMLPackage;
+import org.eclipse.papyrus.RobotML.Software;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Software</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#isIsPeriodic <em>Is Periodic</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getPeriod <em>Period</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getPriority <em>Priority</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getDeadline <em>Deadline</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getWcet <em>Wcet</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SoftwareImpl extends SystemImpl implements Software {
+
+ /**
+ * The default value of the '{@link #isIsPeriodic() <em>Is Periodic</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #isIsPeriodic()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_PERIODIC_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isIsPeriodic() <em>Is Periodic</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #isIsPeriodic()
+ * @generated
+ * @ordered
+ */
+ protected boolean isPeriodic = IS_PERIODIC_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPeriod() <em>Period</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPeriod()
+ * @generated
+ * @ordered
+ */
+ protected static final float PERIOD_EDEFAULT = 0.0F;
+
+ /**
+ * The cached value of the '{@link #getPeriod() <em>Period</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPeriod()
+ * @generated
+ * @ordered
+ */
+ protected float period = PERIOD_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPriority() <em>Priority</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPriority()
+ * @generated
+ * @ordered
+ */
+ protected static final char PRIORITY_EDEFAULT = '\u0000';
+
+ /**
+ * The cached value of the '{@link #getPriority() <em>Priority</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPriority()
+ * @generated
+ * @ordered
+ */
+ protected char priority = PRIORITY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDeadline() <em>Deadline</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDeadline()
+ * @generated
+ * @ordered
+ */
+ protected static final float DEADLINE_EDEFAULT = 0.0F;
+
+ /**
+ * The cached value of the '{@link #getDeadline() <em>Deadline</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDeadline()
+ * @generated
+ * @ordered
+ */
+ protected float deadline = DEADLINE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getWcet() <em>Wcet</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getWcet()
+ * @generated
+ * @ordered
+ */
+ protected static final float WCET_EDEFAULT = 0.0F;
+
+ /**
+ * The cached value of the '{@link #getWcet() <em>Wcet</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getWcet()
+ * @generated
+ * @ordered
+ */
+ protected float wcet = WCET_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SoftwareImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RobotMLPackage.Literals.SOFTWARE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isIsPeriodic() {
+ return isPeriodic;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsPeriodic(boolean newIsPeriodic) {
+ boolean oldIsPeriodic = isPeriodic;
+ isPeriodic = newIsPeriodic;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__IS_PERIODIC, oldIsPeriodic, isPeriodic));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public float getPeriod() {
+ return period;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setPeriod(float newPeriod) {
+ float oldPeriod = period;
+ period = newPeriod;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__PERIOD, oldPeriod, period));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public char getPriority() {
+ return priority;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setPriority(char newPriority) {
+ char oldPriority = priority;
+ priority = newPriority;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__PRIORITY, oldPriority, priority));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public float getDeadline() {
+ return deadline;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDeadline(float newDeadline) {
+ float oldDeadline = deadline;
+ deadline = newDeadline;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__DEADLINE, oldDeadline, deadline));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public float getWcet() {
+ return wcet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setWcet(float newWcet) {
+ float oldWcet = wcet;
+ wcet = newWcet;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__WCET, oldWcet, wcet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch(featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ return isIsPeriodic();
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ return getPeriod();
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ return getPriority();
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ return getDeadline();
+ case RobotMLPackage.SOFTWARE__WCET:
+ return getWcet();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch(featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ setIsPeriodic((Boolean)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ setPeriod((Float)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ setPriority((Character)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ setDeadline((Float)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__WCET:
+ setWcet((Float)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch(featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ setIsPeriodic(IS_PERIODIC_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ setPeriod(PERIOD_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ setPriority(PRIORITY_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ setDeadline(DEADLINE_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__WCET:
+ setWcet(WCET_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch(featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ return isPeriodic != IS_PERIODIC_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ return period != PERIOD_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ return priority != PRIORITY_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ return deadline != DEADLINE_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__WCET:
+ return wcet != WCET_EDEFAULT;
+ }
+ 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(" (isPeriodic: ");
+ result.append(isPeriodic);
+ result.append(", period: ");
+ result.append(period);
+ result.append(", priority: ");
+ result.append(priority);
+ result.append(", deadline: ");
+ result.append(deadline);
+ result.append(", wcet: ");
+ result.append(wcet);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SoftwareImpl

Back to the top