| /** |
| * 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.Pooling_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.Pooling_layers.AvgPool2d3d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.Pooling_layersPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Avg Pool2d3d</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.impl.AvgPool2d3dImpl#getDivisor_override <em>Divisor override</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class AvgPool2d3dImpl extends Pooling_layers_1_1_2_1Impl implements AvgPool2d3d { |
| /** |
| * The default value of the '{@link #getDivisor_override() <em>Divisor override</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDivisor_override() |
| * @generated |
| * @ordered |
| */ |
| protected static final int DIVISOR_OVERRIDE_EDEFAULT = 0; |
| |
| /** |
| * The cached value of the '{@link #getDivisor_override() <em>Divisor override</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDivisor_override() |
| * @generated |
| * @ordered |
| */ |
| protected int divisor_override = DIVISOR_OVERRIDE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected AvgPool2d3dImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return Pooling_layersPackage.Literals.AVG_POOL2D3D; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public int getDivisor_override() { |
| return divisor_override; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setDivisor_override(int newDivisor_override) { |
| int oldDivisor_override = divisor_override; |
| divisor_override = newDivisor_override; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Pooling_layersPackage.AVG_POOL2D3D__DIVISOR_OVERRIDE, oldDivisor_override, divisor_override)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case Pooling_layersPackage.AVG_POOL2D3D__DIVISOR_OVERRIDE: |
| return getDivisor_override(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case Pooling_layersPackage.AVG_POOL2D3D__DIVISOR_OVERRIDE: |
| setDivisor_override((Integer)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case Pooling_layersPackage.AVG_POOL2D3D__DIVISOR_OVERRIDE: |
| setDivisor_override(DIVISOR_OVERRIDE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case Pooling_layersPackage.AVG_POOL2D3D__DIVISOR_OVERRIDE: |
| return divisor_override != DIVISOR_OVERRIDE_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(" (divisor_override: "); //$NON-NLS-1$ |
| result.append(divisor_override); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //AvgPool2d3dImpl |