blob: 79b435414d945ad9a37257174bb7e35bc98d868b [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - 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:
* Christophe Loetz - Initial implementation
*
*/
package org.eclipse.osbp.xtext.functionlibrarydsl.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.dsl.semantic.common.types.LDataType;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryConverterGroup;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryDSLPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Function Library Converter Group</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.xtext.functionlibrarydsl.impl.FunctionLibraryConverterGroupImpl#getConvertToModelDatatype <em>Convert To Model Datatype</em>}</li>
* <li>{@link org.eclipse.osbp.xtext.functionlibrarydsl.impl.FunctionLibraryConverterGroupImpl#getConvertToPresentationDatatype <em>Convert To Presentation Datatype</em>}</li>
* </ul>
*
* @generated
*/
public class FunctionLibraryConverterGroupImpl extends FunctionLibraryGroupImpl implements FunctionLibraryConverterGroup {
/**
* The cached value of the '{@link #getConvertToModelDatatype() <em>Convert To Model Datatype</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConvertToModelDatatype()
* @generated
* @ordered
*/
protected LDataType convertToModelDatatype;
/**
* The cached value of the '{@link #getConvertToPresentationDatatype() <em>Convert To Presentation Datatype</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConvertToPresentationDatatype()
* @generated
* @ordered
*/
protected LDataType convertToPresentationDatatype;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FunctionLibraryConverterGroupImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FunctionLibraryDSLPackage.Literals.FUNCTION_LIBRARY_CONVERTER_GROUP;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LDataType getConvertToModelDatatype() {
if (convertToModelDatatype != null && convertToModelDatatype.eIsProxy()) {
InternalEObject oldConvertToModelDatatype = (InternalEObject)convertToModelDatatype;
convertToModelDatatype = (LDataType)eResolveProxy(oldConvertToModelDatatype);
if (convertToModelDatatype != oldConvertToModelDatatype) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_MODEL_DATATYPE, oldConvertToModelDatatype, convertToModelDatatype));
}
}
return convertToModelDatatype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LDataType basicGetConvertToModelDatatype() {
return convertToModelDatatype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setConvertToModelDatatype(LDataType newConvertToModelDatatype) {
LDataType oldConvertToModelDatatype = convertToModelDatatype;
convertToModelDatatype = newConvertToModelDatatype;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_MODEL_DATATYPE, oldConvertToModelDatatype, convertToModelDatatype));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LDataType getConvertToPresentationDatatype() {
if (convertToPresentationDatatype != null && convertToPresentationDatatype.eIsProxy()) {
InternalEObject oldConvertToPresentationDatatype = (InternalEObject)convertToPresentationDatatype;
convertToPresentationDatatype = (LDataType)eResolveProxy(oldConvertToPresentationDatatype);
if (convertToPresentationDatatype != oldConvertToPresentationDatatype) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_PRESENTATION_DATATYPE, oldConvertToPresentationDatatype, convertToPresentationDatatype));
}
}
return convertToPresentationDatatype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LDataType basicGetConvertToPresentationDatatype() {
return convertToPresentationDatatype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setConvertToPresentationDatatype(LDataType newConvertToPresentationDatatype) {
LDataType oldConvertToPresentationDatatype = convertToPresentationDatatype;
convertToPresentationDatatype = newConvertToPresentationDatatype;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_PRESENTATION_DATATYPE, oldConvertToPresentationDatatype, convertToPresentationDatatype));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_MODEL_DATATYPE:
if (resolve) return getConvertToModelDatatype();
return basicGetConvertToModelDatatype();
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_PRESENTATION_DATATYPE:
if (resolve) return getConvertToPresentationDatatype();
return basicGetConvertToPresentationDatatype();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_MODEL_DATATYPE:
setConvertToModelDatatype((LDataType)newValue);
return;
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_PRESENTATION_DATATYPE:
setConvertToPresentationDatatype((LDataType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_MODEL_DATATYPE:
setConvertToModelDatatype((LDataType)null);
return;
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_PRESENTATION_DATATYPE:
setConvertToPresentationDatatype((LDataType)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_MODEL_DATATYPE:
return convertToModelDatatype != null;
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP__CONVERT_TO_PRESENTATION_DATATYPE:
return convertToPresentationDatatype != null;
}
return super.eIsSet(featureID);
}
} //FunctionLibraryConverterGroupImpl