diff options
author | 2021-08-03 18:42:39 +0900 | |
---|---|---|
committer | 2021-08-06 19:32:38 +0900 | |
commit | be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 (patch) | |
tree | 1f3f1a96251ac4f655c8a96fc33d5d4ee779cd06 /rba.model.core/src/rba/core/impl/SceneImpl.java | |
parent | 71ca7c6cab863767ef30c8bd05b2bbfda8731cb5 (diff) |
Initial commit
Bug-AGL: SPEC-4033
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Diffstat (limited to 'rba.model.core/src/rba/core/impl/SceneImpl.java')
-rw-r--r-- | rba.model.core/src/rba/core/impl/SceneImpl.java | 245 |
1 files changed, 245 insertions, 0 deletions
diff --git a/rba.model.core/src/rba/core/impl/SceneImpl.java b/rba.model.core/src/rba/core/impl/SceneImpl.java new file mode 100644 index 0000000..9cdd3a4 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SceneImpl.java @@ -0,0 +1,245 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.AbstractProperty; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.Scene; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Scene</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.SceneImpl#isGlobal <em>Global</em>}</li> + * <li>{@link rba.core.impl.SceneImpl#getProperties <em>Properties</em>}</li> + * </ul> + * + * @generated + */ +public class SceneImpl extends AbstractSceneImpl implements Scene { + /** + * The default value of the '{@link #isGlobal() <em>Global</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isGlobal() + * @generated + * @ordered + */ + protected static final boolean GLOBAL_EDEFAULT = false; + + /** + * The cached value of the '{@link #isGlobal() <em>Global</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isGlobal() + * @generated + * @ordered + */ + protected boolean global = GLOBAL_EDEFAULT; + + /** + * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list. + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @see #getProperties() + * @generated + * @ordered + */ + protected EList<AbstractProperty> properties; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SceneImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SCENE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean isGlobal() { + return global; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setGlobal(boolean newGlobal) { + boolean oldGlobal = global; + global = newGlobal; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.SCENE__GLOBAL, oldGlobal, global)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AbstractProperty> getProperties() { + if (properties == null) { + properties = new EObjectContainmentWithInverseEList<AbstractProperty>(AbstractProperty.class, this, + RBACorePackage.SCENE__PROPERTIES, RBACorePackage.ABSTRACT_PROPERTY__OWNER); + } + return properties; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.SCENE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.SCENE__PROPERTIES: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getProperties()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.SCENE__PROPERTIES: + return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + return isGlobal(); + case RBACorePackage.SCENE__PROPERTIES: + return getProperties(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + setGlobal((Boolean) newValue); + return; + case RBACorePackage.SCENE__PROPERTIES: + getProperties().clear(); + getProperties().addAll((Collection<? extends AbstractProperty>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + setGlobal(GLOBAL_EDEFAULT); + return; + case RBACorePackage.SCENE__PROPERTIES: + getProperties().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + return global != GLOBAL_EDEFAULT; + case RBACorePackage.SCENE__PROPERTIES: + return properties != null && !properties.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.SCENE___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (global: "); + result.append(global); + result.append(')'); + return result.toString(); + } + +} // SceneImpl |