//------------------------------------------------------------------------------- // This package was automatically generated from EXPRESS (ISO STEP 10303 part11) // by a java generator build with the meta CASE tool Platypus // (alain.plantec@univ-brest.fr) // // Please, be aware that any hand-made updating of this file can be lost!!. //------------------------------------------------------------------------------- package CheddarBridge; import java.util.*; import java.io.*; import step.core.*; class Generic_TaskStepRW extends Named_ObjectStepRW { public step.core.StepCoreObject coreObject() { return new Generic_Task(); } public String entityName() { return Generic_Task.EntityName(); } public Tasks_Type getTaskType(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 2); return Tasks_Type.fromString((String) convertedStepValue(repo, stepVal)); } public String getCpuName(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 3); return (String) convertedStepValue(repo, stepVal); } public String getAddressSpaceName(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 4); return (String) convertedStepValue(repo, stepVal); } public Integer getCapacity(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 5); return (Integer) convertedStepValue(repo, stepVal); } public Integer getDeadline(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 6); return (Integer) convertedStepValue(repo, stepVal); } public Integer getStartTime(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 7); return (Integer) convertedStepValue(repo, stepVal); } public Integer getPriority(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 8); return (Integer) convertedStepValue(repo, stepVal); } public Integer getBlockingTime(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 9); return (Integer) convertedStepValue(repo, stepVal); } public Policies getPolicy(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(10); return Policies.fromString((String) convertedStepValue(repo, stepVal)); } public ArrayList getOffsets(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(11); return (ArrayList) convertedStepValue(repo, stepVal); } public Integer getTextMemorySize(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(12); return (Integer) convertedStepValue(repo, stepVal); } public Integer getStackMemorySize(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(13); return (Integer) convertedStepValue(repo, stepVal); } public ArrayList getParameters(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(14); return (ArrayList) convertedStepValue(repo, stepVal); } public Integer getCriticality(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(15); return (Integer) convertedStepValue(repo, stepVal); } public Integer getContextSwitchOverhead(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(16); return (Integer) convertedStepValue(repo, stepVal); } public void initializeCoreObject(StepCoreRepository repo, step.core.StepCoreObject coreObj, StepGenericInstance si) throws Exception { super.initializeCoreObject(repo, coreObj, si); Generic_Task obj = (Generic_Task) coreObj; obj.setTaskType(getTaskType(repo, (StepInternalRepresentation) si)); obj.setCpuName(getCpuName(repo, (StepInternalRepresentation) si)); obj.setAddressSpaceName(getAddressSpaceName(repo, (StepInternalRepresentation) si)); obj.setCapacity(getCapacity(repo, (StepInternalRepresentation) si)); obj.setDeadline(getDeadline(repo, (StepInternalRepresentation) si)); obj.setStartTime(getStartTime(repo, (StepInternalRepresentation) si)); obj.setPriority(getPriority(repo, (StepInternalRepresentation) si)); obj.setBlockingTime(getBlockingTime(repo, (StepInternalRepresentation) si)); obj.setPolicy(getPolicy(repo, (StepInternalRepresentation) si)); obj.setOffsets(getOffsets(repo, (StepInternalRepresentation) si)); obj.setTextMemorySize(getTextMemorySize(repo, (StepInternalRepresentation) si)); obj.setStackMemorySize(getStackMemorySize(repo, (StepInternalRepresentation) si)); obj.setParameters(getParameters(repo, (StepInternalRepresentation) si)); obj.setCriticality(getCriticality(repo, (StepInternalRepresentation) si)); obj.setContextSwitchOverhead(getContextSwitchOverhead(repo, (StepInternalRepresentation) si)); } public StepGenericInstance genericInstance(StepCoreRepository crepo, step.core.StepCoreObject coreObj) throws Exception { StepInternalRepresentation si = (StepInternalRepresentation) super.genericInstance(crepo, coreObj); Generic_Task obj = (Generic_Task) coreObj; si.add(stepValueOf(crepo, obj.getTaskType())); si.add(stepValueOf(crepo, obj.getCpuName())); si.add(stepValueOf(crepo, obj.getAddressSpaceName())); si.add(stepValueOf(crepo, obj.getCapacity())); si.add(stepValueOf(crepo, obj.getDeadline())); si.add(stepValueOf(crepo, obj.getStartTime())); si.add(stepValueOf(crepo, obj.getPriority())); si.add(stepValueOf(crepo, obj.getBlockingTime())); si.add(stepValueOf(crepo, obj.getPolicy())); si.add(stepValueOf(crepo, obj.getOffsets())); si.add(stepValueOf(crepo, obj.getTextMemorySize())); si.add(stepValueOf(crepo, obj.getStackMemorySize())); si.add(stepValueOf(crepo, obj.getParameters())); si.add(stepValueOf(crepo, obj.getCriticality())); si.add(stepValueOf(crepo, obj.getContextSwitchOverhead())); return si; } }