blob: f7ee96567d79118ffbd9c8abe0786df49031b702 [file] [log] [blame]
/**
* Copyright (c) 2020 CEA LIST
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
*/
package org.eclipse.papyrus.aiml.profile.AIML.Convolution_layers.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.papyrus.aiml.profile.AIML.Convolution_layers.Convolution_layersPackage;
import org.eclipse.papyrus.aiml.profile.AIML.Convolution_layers.LayerWithFilter;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Layer With Filter</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.aiml.profile.AIML.Convolution_layers.impl.LayerWithFilterImpl#getOut_channels <em>Out channels</em>}</li>
* </ul>
*
* @generated
*/
public abstract class LayerWithFilterImpl extends ConvolutionImpl implements LayerWithFilter {
/**
* The default value of the '{@link #getOut_channels() <em>Out channels</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOut_channels()
* @generated
* @ordered
*/
protected static final int OUT_CHANNELS_EDEFAULT = 0;
/**
* The cached value of the '{@link #getOut_channels() <em>Out channels</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOut_channels()
* @generated
* @ordered
*/
protected int out_channels = OUT_CHANNELS_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected LayerWithFilterImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return Convolution_layersPackage.Literals.LAYER_WITH_FILTER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int getOut_channels() {
return out_channels;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setOut_channels(int newOut_channels) {
int oldOut_channels = out_channels;
out_channels = newOut_channels;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Convolution_layersPackage.LAYER_WITH_FILTER__OUT_CHANNELS, oldOut_channels, out_channels));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Convolution_layersPackage.LAYER_WITH_FILTER__OUT_CHANNELS:
return getOut_channels();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Convolution_layersPackage.LAYER_WITH_FILTER__OUT_CHANNELS:
setOut_channels((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Convolution_layersPackage.LAYER_WITH_FILTER__OUT_CHANNELS:
setOut_channels(OUT_CHANNELS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Convolution_layersPackage.LAYER_WITH_FILTER__OUT_CHANNELS:
return out_channels != OUT_CHANNELS_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (out_channels: "); //$NON-NLS-1$
result.append(out_channels);
result.append(')');
return result.toString();
}
} //LayerWithFilterImpl