Harald Mackamul | ca6c8b6 | 2019-02-14 16:41:16 +0100 | [diff] [blame] | 1 | /** |
| 2 | * ******************************************************************************* |
| 3 | * Copyright (c) 2018-2019 Robert Bosch GmbH. |
| 4 | * |
| 5 | * This program and the accompanying materials are made |
| 6 | * available under the terms of the Eclipse Public License 2.0 |
| 7 | * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| 8 | * |
| 9 | * SPDX-License-Identifier: EPL-2.0 |
| 10 | * |
| 11 | * Contributors: |
| 12 | * Robert Bosch GmbH - initial API and implementation |
| 13 | * ******************************************************************************* |
| 14 | */ |
| 15 | |
Zakir Meer | 9f251f5 | 2018-06-17 16:21:31 +0200 | [diff] [blame] | 16 | package templates |
| 17 | |
| 18 | import com.inchron.realtime.root.RootFactory |
| 19 | import com.inchron.realtime.root.model.Model |
| 20 | import com.inchron.realtime.root.model.ModelFactory |
| 21 | import com.inchron.realtime.root.model.memory.MemoryFactory |
| 22 | import com.inchron.realtime.root.model.stimulation.StimulationFactory |
| 23 | import org.eclipse.app4mc.amalthea.model.Amalthea |
| 24 | import org.eclipse.app4mc.amalthea.model.AmaltheaFactory |
| 25 | import org.eclipse.app4mc.transformation.extensions.base.templates.AbstractTransformer |
Zakir Meer | 9f251f5 | 2018-06-17 16:21:31 +0200 | [diff] [blame] | 26 | |
Sebastian Reiser | dde603f | 2019-04-04 10:07:52 +0200 | [diff] [blame] | 27 | abstract class AbstractAmaltheaInchronTransformer extends AbstractTransformer { |
Harald Mackamul | ca6c8b6 | 2019-02-14 16:41:16 +0100 | [diff] [blame] | 28 | |
Sebastian Reiser | d2cae8b | 2019-04-03 13:39:33 +0200 | [diff] [blame^] | 29 | public def Amalthea getAmaltheaRoot(){ |
| 30 | return (customObjsStore.getInstance(Amalthea) as Amalthea) |
| 31 | } |
Harald Mackamul | ca6c8b6 | 2019-02-14 16:41:16 +0100 | [diff] [blame] | 32 | |
Sebastian Reiser | d2cae8b | 2019-04-03 13:39:33 +0200 | [diff] [blame^] | 33 | public def Model getInchronRoot(){ |
| 34 | return (customObjsStore.getInstance(Model) as Model) |
| 35 | } |
| 36 | |
| 37 | /*- Factory initialization */ |
| 38 | public def getInchronRootFactory(){ |
| 39 | return RootFactory.eINSTANCE} |
Zakir Meer | 9f251f5 | 2018-06-17 16:21:31 +0200 | [diff] [blame] | 40 | |
Sebastian Reiser | d2cae8b | 2019-04-03 13:39:33 +0200 | [diff] [blame^] | 41 | public def getInchronModelFactory(){ |
| 42 | ModelFactory.eINSTANCE} |
Zakir Meer | 9f251f5 | 2018-06-17 16:21:31 +0200 | [diff] [blame] | 43 | |
Sebastian Reiser | d2cae8b | 2019-04-03 13:39:33 +0200 | [diff] [blame^] | 44 | public def getInchronMemoryFactory(){ |
| 45 | MemoryFactory.eINSTANCE} |
Harald Mackamul | ca6c8b6 | 2019-02-14 16:41:16 +0100 | [diff] [blame] | 46 | |
Sebastian Reiser | d2cae8b | 2019-04-03 13:39:33 +0200 | [diff] [blame^] | 47 | public def getInchronStimulationFactory(){ |
| 48 | StimulationFactory.eINSTANCE} |
Zakir Meer | 9f251f5 | 2018-06-17 16:21:31 +0200 | [diff] [blame] | 49 | |
Sebastian Reiser | d2cae8b | 2019-04-03 13:39:33 +0200 | [diff] [blame^] | 50 | public def getAmaltheaFactory(){ |
| 51 | AmaltheaFactory.eINSTANCE} |
Harald Mackamul | ca6c8b6 | 2019-02-14 16:41:16 +0100 | [diff] [blame] | 52 | } |