| /** |
| * 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Joerg Riegel - 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.FSMActionDTOClear; |
| import org.eclipse.osbp.xtext.statemachine.FSMControlDTOAttribute; |
| import org.eclipse.osbp.xtext.statemachine.StatemachineDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>FSM Action DTO Clear</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.statemachine.impl.FSMActionDTOClearImpl#getDto <em>Dto</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class FSMActionDTOClearImpl extends FSMLazyResolverImpl implements FSMActionDTOClear { |
| /** |
| * The cached value of the '{@link #getDto() <em>Dto</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDto() |
| * @generated |
| * @ordered |
| */ |
| protected FSMControlDTOAttribute dto; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected FSMActionDTOClearImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StatemachineDSLPackage.Literals.FSM_ACTION_DTO_CLEAR; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FSMControlDTOAttribute getDto() { |
| if (dto != null && dto.eIsProxy()) { |
| InternalEObject oldDto = (InternalEObject)dto; |
| dto = (FSMControlDTOAttribute)eResolveProxy(oldDto); |
| if (dto != oldDto) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, StatemachineDSLPackage.FSM_ACTION_DTO_CLEAR__DTO, oldDto, dto)); |
| } |
| } |
| return dto; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FSMControlDTOAttribute basicGetDto() { |
| return dto; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDto(FSMControlDTOAttribute newDto) { |
| FSMControlDTOAttribute oldDto = dto; |
| dto = newDto; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StatemachineDSLPackage.FSM_ACTION_DTO_CLEAR__DTO, oldDto, dto)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_ACTION_DTO_CLEAR__DTO: |
| if (resolve) return getDto(); |
| return basicGetDto(); |
| } |
| 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.FSM_ACTION_DTO_CLEAR__DTO: |
| setDto((FSMControlDTOAttribute)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_ACTION_DTO_CLEAR__DTO: |
| setDto((FSMControlDTOAttribute)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_ACTION_DTO_CLEAR__DTO: |
| return dto != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //FSMActionDTOClearImpl |