/*
* Copyright (c) 2003- michael lawley and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation
* which accompanies this distribution, and is available by writing to
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Contributors:
* michael lawley
*
*
*/
package tefkat.model.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import tefkat.model.CompoundExpr;
import tefkat.model.SimpleExpr;
import tefkat.model.TefkatPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Simple Expr</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link tefkat.model.impl.SimpleExprImpl#getRepresentation <em>Representation</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class SimpleExprImpl extends ExpressionImpl implements SimpleExpr {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Copyright michael lawley Pty Ltd 2003-2007";
/**
* The default value of the '{@link #getRepresentation() <em>Representation</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRepresentation()
* @generated
* @ordered
*/
protected static final String REPRESENTATION_EDEFAULT = null;
/**
* The cached value of the '{@link #getRepresentation() <em>Representation</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRepresentation()
* @generated
* @ordered
*/
protected String representation = REPRESENTATION_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SimpleExprImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return TefkatPackage.Literals.SIMPLE_EXPR;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getRepresentation() {
return representation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setRepresentation(String newRepresentation) {
String oldRepresentation = representation;
representation = newRepresentation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TefkatPackage.SIMPLE_EXPR__REPRESENTATION, oldRepresentation, representation));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case TefkatPackage.SIMPLE_EXPR__REPRESENTATION:
return getRepresentation();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case TefkatPackage.SIMPLE_EXPR__REPRESENTATION:
setRepresentation((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case TefkatPackage.SIMPLE_EXPR__REPRESENTATION:
setRepresentation(REPRESENTATION_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case TefkatPackage.SIMPLE_EXPR__REPRESENTATION:
return REPRESENTATION_EDEFAULT == null ? representation != null : !REPRESENTATION_EDEFAULT.equals(representation);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public String toString() {
if (eIsProxy()) return super.toString();
return representation;
}
} //SimpleExprImpl