blob: 22a985c2caa27140cc83162bb3e7f71700f1c945 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013, 2019 Willink Transformations and others.
* 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
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/
package org.eclipse.qvtd.pivot.qvtimperative.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.pivot.util.Visitor;
import org.eclipse.qvtd.pivot.qvtbase.impl.BaseModelImpl;
import org.eclipse.qvtd.pivot.qvtimperative.ImperativeModel;
import org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage;
import org.eclipse.qvtd.pivot.qvtimperative.util.QVTimperativeVisitor;
import org.eclipse.qvtd.pivot.qvtschedule.utilities.SymbolNameAdapter;
import org.eclipse.qvtd.pivot.qvtschedule.utilities.SymbolNameBuilder;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Imperative Model</b></em>'.
* <!-- end-user-doc -->
*
* @generated
*/
public class ImperativeModelImpl extends BaseModelImpl implements ImperativeModel {
/**
* The number of structural features of the '<em>Imperative Model</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
public static final int IMPERATIVE_MODEL_FEATURE_COUNT = BaseModelImpl.BASE_MODEL_FEATURE_COUNT + 0;
/**
* The number of operations of the '<em>Imperative Model</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
public static final int IMPERATIVE_MODEL_OPERATION_COUNT = BaseModelImpl.BASE_MODEL_OPERATION_COUNT + 0;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ImperativeModelImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return QVTimperativePackage.Literals.IMPERATIVE_MODEL;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public <R> R accept(@NonNull Visitor<R> visitor) {
if (visitor instanceof QVTimperativeVisitor) {
return (R) ((QVTimperativeVisitor<?>)visitor).visitImperativeModel(this);
}
else {
return super.accept(visitor);
}
}
/**
* Map reserving a unique symbol name per region or connection.
*/
private @Nullable SymbolNameAdapter symbolNameAdapter = null; // FIXME promote to Model/ModelImpl
@Override
public @NonNull SymbolNameAdapter getSymbolNameAdapter() {
SymbolNameAdapter symbolNameAdapter2 = symbolNameAdapter;
if (symbolNameAdapter2 == null) {
symbolNameAdapter = symbolNameAdapter2 = SymbolNameAdapter.get(this);
}
return symbolNameAdapter2;
}
@Override
public @NonNull String reserveSymbolName(@NonNull SymbolNameBuilder symbolNameBuilder, @NonNull Object object) {
return getSymbolNameAdapter().reserveSymbolName(symbolNameBuilder, object);
}
} //ImperativeModelImpl