| package templates.m2m.sw |
| |
| import org.eclipse.app4mc.amalthea.model.Mode |
| import org.eclipse.app4mc.amalthea.model.ModeLiteral |
| import templates.AbstractAmaltheaInchronTransformer |
| import templates.utils.AmltCacheModel |
| |
| class ModeTransformer extends AbstractAmaltheaInchronTransformer { |
| |
| var AmltCacheModel cacheModel |
| |
| public def create inchronModelFactory.createModeGroup createModeGroup(Mode amltMode){ |
| |
| cacheModel = customObjsStore.getInstance(AmltCacheModel) |
| |
| it.name=amltMode.name |
| |
| amltMode?.literals?.forEach[amltModeLiteral, index|{ |
| it.modes.add(createMode(amltModeLiteral,index)) |
| }] |
| |
| cacheModel.addInchronModeGroup(it) |
| } |
| |
| |
| public def create inchronModelFactory.createMode createMode(ModeLiteral amltModeLiteral, int index){ |
| |
| it.name=amltModeLiteral.name |
| it.value=index |
| } |
| } |