blob: e51d2b08d572f4694b52269cbf26959bffe80325 [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 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 - 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.xtext.functionlibrarydsl.FunctionLibraryDSLPackage;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryRate;
import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryRating;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Function Library Rate</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.osbp.xtext.functionlibrarydsl.impl.FunctionLibraryRateImpl#getOftype <em>Oftype</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class FunctionLibraryRateImpl extends FunctionLibraryBaseFunctionImpl implements FunctionLibraryRate {
/**
* The cached value of the '{@link #getOftype() <em>Oftype</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOftype()
* @generated
* @ordered
*/
protected FunctionLibraryRating oftype;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FunctionLibraryRateImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FunctionLibraryDSLPackage.Literals.FUNCTION_LIBRARY_RATE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FunctionLibraryRating getOftype() {
if (oftype != null && oftype.eIsProxy()) {
InternalEObject oldOftype = (InternalEObject)oftype;
oftype = (FunctionLibraryRating)eResolveProxy(oldOftype);
if (oftype != oldOftype) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATE__OFTYPE, oldOftype, oftype));
}
}
return oftype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FunctionLibraryRating basicGetOftype() {
return oftype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOftype(FunctionLibraryRating newOftype) {
FunctionLibraryRating oldOftype = oftype;
oftype = newOftype;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATE__OFTYPE, oldOftype, oftype));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATE__OFTYPE:
if (resolve) return getOftype();
return basicGetOftype();
}
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_RATE__OFTYPE:
setOftype((FunctionLibraryRating)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_RATE__OFTYPE:
setOftype((FunctionLibraryRating)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATE__OFTYPE:
return oftype != null;
}
return super.eIsSet(featureID);
}
} //FunctionLibraryRateImpl