| /** |
| * Copyright (c) 2011, 2017 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * 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 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.statemachine.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.osbp.xtext.statemachine.StatemachineActionPeripheralOpenDrawer; |
| import org.eclipse.osbp.xtext.statemachine.StatemachineDSLPackage; |
| import org.eclipse.osbp.xtext.statemachine.StatemachinePeripheralDeviceCashDrawer; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Statemachine Action Peripheral Open Drawer</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.statemachine.impl.StatemachineActionPeripheralOpenDrawerImpl#getDevice <em>Device</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class StatemachineActionPeripheralOpenDrawerImpl extends StatemachineLazyResolverImpl implements StatemachineActionPeripheralOpenDrawer { |
| /** |
| * The cached value of the '{@link #getDevice() <em>Device</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDevice() |
| * @generated |
| * @ordered |
| */ |
| protected StatemachinePeripheralDeviceCashDrawer device; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected StatemachineActionPeripheralOpenDrawerImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StatemachineDSLPackage.Literals.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StatemachinePeripheralDeviceCashDrawer getDevice() { |
| if (device != null && device.eIsProxy()) { |
| InternalEObject oldDevice = (InternalEObject)device; |
| device = (StatemachinePeripheralDeviceCashDrawer)eResolveProxy(oldDevice); |
| if (device != oldDevice) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, StatemachineDSLPackage.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER__DEVICE, oldDevice, device)); |
| } |
| } |
| return device; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StatemachinePeripheralDeviceCashDrawer basicGetDevice() { |
| return device; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDevice(StatemachinePeripheralDeviceCashDrawer newDevice) { |
| StatemachinePeripheralDeviceCashDrawer oldDevice = device; |
| device = newDevice; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StatemachineDSLPackage.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER__DEVICE, oldDevice, device)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StatemachineDSLPackage.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER__DEVICE: |
| if (resolve) return getDevice(); |
| return basicGetDevice(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case StatemachineDSLPackage.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER__DEVICE: |
| setDevice((StatemachinePeripheralDeviceCashDrawer)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StatemachineDSLPackage.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER__DEVICE: |
| setDevice((StatemachinePeripheralDeviceCashDrawer)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StatemachineDSLPackage.STATEMACHINE_ACTION_PERIPHERAL_OPEN_DRAWER__DEVICE: |
| return device != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //StatemachineActionPeripheralOpenDrawerImpl |