| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id$ |
| */ |
| package org.eclipse.stem.loggers.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.stem.core.logger.impl.LoggerImpl; |
| import org.eclipse.stem.jobs.simulation.ISimulation; |
| import org.eclipse.stem.jobs.simulation.SimulationEvent; |
| import org.eclipse.stem.loggers.LOGGER_EVENTS; |
| import org.eclipse.stem.loggers.SimulationLogger; |
| import org.eclipse.stem.loggers.SimulationLoggerPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Simulation Logger</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.stem.loggers.impl.SimulationLoggerImpl#isEnabled <em>Enabled</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public abstract class SimulationLoggerImpl extends LoggerImpl implements SimulationLogger { |
| /** |
| * The default value of the '{@link #isEnabled() <em>Enabled</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isEnabled() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean ENABLED_EDEFAULT = true; |
| |
| /** |
| * The cached value of the '{@link #isEnabled() <em>Enabled</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isEnabled() |
| * @generated |
| * @ordered |
| */ |
| protected boolean enabled = ENABLED_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected SimulationLoggerImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return SimulationLoggerPackage.Literals.SIMULATION_LOGGER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isEnabled() { |
| return enabled; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setEnabled(boolean newEnabled) { |
| boolean oldEnabled = enabled; |
| enabled = newEnabled; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, SimulationLoggerPackage.SIMULATION_LOGGER__ENABLED, oldEnabled, enabled)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void simulationEvent(SimulationEvent event) { |
| // TODO: implement this method |
| // Ensure that you remove @generated or mark it @generated NOT |
| throw new UnsupportedOperationException(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void loggerEvent(ISimulation simulation, LOGGER_EVENTS event) { |
| // TODO: implement this method |
| // Ensure that you remove @generated or mark it @generated NOT |
| throw new UnsupportedOperationException(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated NOT |
| */ |
| // public void simulationEvent(SimulationEvent event) { |
| // // TODO: implement this method |
| // // Ensure that you remove @generated or mark it @generated NOT |
| // throw new UnsupportedOperationException(); |
| // } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated NOT |
| */ |
| // public void loggerEvent(ISimulation simulation, LOGGER_EVENTS event) { |
| // // TODO: implement this method |
| // // Ensure that you remove @generated or mark it @generated NOT |
| // throw new UnsupportedOperationException(); |
| // } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case SimulationLoggerPackage.SIMULATION_LOGGER__ENABLED: |
| return isEnabled(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case SimulationLoggerPackage.SIMULATION_LOGGER__ENABLED: |
| setEnabled((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case SimulationLoggerPackage.SIMULATION_LOGGER__ENABLED: |
| setEnabled(ENABLED_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case SimulationLoggerPackage.SIMULATION_LOGGER__ENABLED: |
| return enabled != ENABLED_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(" (enabled: "); |
| result.append(enabled); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //SimulationLoggerImpl |