blob: d6b9a379b04935c1e9952c5d16a54ffcffb45868 [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2017 Timing-Architects Embedded Systems GmbH and others.
* 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
*
* Generated using Eclipse EMF
*
* *******************************************************************************
*/
package org.eclipse.app4mc.amalthea.generator.configuration.impl;
import org.eclipse.app4mc.amalthea.generator.configuration.CallGraphProperties;
import org.eclipse.app4mc.amalthea.generator.configuration.PercentageDistribution;
import org.eclipse.app4mc.amalthea.generator.configuration.RTMGCPackage;
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.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Call Graph Properties</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.app4mc.amalthea.generator.configuration.impl.CallGraphPropertiesImpl#getSignalDomainCoverage <em>Signal Domain Coverage</em>}</li>
* <li>{@link org.eclipse.app4mc.amalthea.generator.configuration.impl.CallGraphPropertiesImpl#getCallSequenceUsage <em>Call Sequence Usage</em>}</li>
* </ul>
*
* @generated
*/
public class CallGraphPropertiesImpl extends MinimalEObjectImpl.Container implements CallGraphProperties {
/**
* The cached value of the '{@link #getSignalDomainCoverage() <em>Signal Domain Coverage</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSignalDomainCoverage()
* @generated
* @ordered
*/
protected PercentageDistribution signalDomainCoverage;
/**
* The cached value of the '{@link #getCallSequenceUsage() <em>Call Sequence Usage</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCallSequenceUsage()
* @generated
* @ordered
*/
protected PercentageDistribution callSequenceUsage;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CallGraphPropertiesImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return RTMGCPackage.Literals.CALL_GRAPH_PROPERTIES;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PercentageDistribution getSignalDomainCoverage() {
return signalDomainCoverage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSignalDomainCoverage(PercentageDistribution newSignalDomainCoverage, NotificationChain msgs) {
PercentageDistribution oldSignalDomainCoverage = signalDomainCoverage;
signalDomainCoverage = newSignalDomainCoverage;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE, oldSignalDomainCoverage, newSignalDomainCoverage);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSignalDomainCoverage(PercentageDistribution newSignalDomainCoverage) {
if (newSignalDomainCoverage != signalDomainCoverage) {
NotificationChain msgs = null;
if (signalDomainCoverage != null)
msgs = ((InternalEObject)signalDomainCoverage).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE, null, msgs);
if (newSignalDomainCoverage != null)
msgs = ((InternalEObject)newSignalDomainCoverage).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE, null, msgs);
msgs = basicSetSignalDomainCoverage(newSignalDomainCoverage, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE, newSignalDomainCoverage, newSignalDomainCoverage));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PercentageDistribution getCallSequenceUsage() {
return callSequenceUsage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCallSequenceUsage(PercentageDistribution newCallSequenceUsage, NotificationChain msgs) {
PercentageDistribution oldCallSequenceUsage = callSequenceUsage;
callSequenceUsage = newCallSequenceUsage;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE, oldCallSequenceUsage, newCallSequenceUsage);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCallSequenceUsage(PercentageDistribution newCallSequenceUsage) {
if (newCallSequenceUsage != callSequenceUsage) {
NotificationChain msgs = null;
if (callSequenceUsage != null)
msgs = ((InternalEObject)callSequenceUsage).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE, null, msgs);
if (newCallSequenceUsage != null)
msgs = ((InternalEObject)newCallSequenceUsage).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE, null, msgs);
msgs = basicSetCallSequenceUsage(newCallSequenceUsage, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE, newCallSequenceUsage, newCallSequenceUsage));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE:
return basicSetSignalDomainCoverage(null, msgs);
case RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE:
return basicSetCallSequenceUsage(null, 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 RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE:
return getSignalDomainCoverage();
case RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE:
return getCallSequenceUsage();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE:
setSignalDomainCoverage((PercentageDistribution)newValue);
return;
case RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE:
setCallSequenceUsage((PercentageDistribution)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE:
setSignalDomainCoverage((PercentageDistribution)null);
return;
case RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE:
setCallSequenceUsage((PercentageDistribution)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case RTMGCPackage.CALL_GRAPH_PROPERTIES__SIGNAL_DOMAIN_COVERAGE:
return signalDomainCoverage != null;
case RTMGCPackage.CALL_GRAPH_PROPERTIES__CALL_SEQUENCE_USAGE:
return callSequenceUsage != null;
}
return super.eIsSet(featureID);
}
} //CallGraphPropertiesImpl