//------------------------------------------------------------------------------- // 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_ResourceStepRW extends Named_ObjectStepRW { public step.core.StepCoreObject coreObject() { return new Generic_Resource(); } public String entityName() { return Generic_Resource.EntityName(); } public Integer getState(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 2); return (Integer) convertedStepValue(repo, stepVal); } public Integer getSize(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 3); return (Integer) convertedStepValue(repo, stepVal); } public Integer getAddress(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 4); return (Integer) convertedStepValue(repo, stepVal); } public Resources_Type getProtocol(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 5); return Resources_Type.fromString((String) convertedStepValue(repo, stepVal)); } public ArrayList getCriticalSections(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 6); return (ArrayList) convertedStepValue(repo, stepVal); } public String getCpuName(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 7); return (String) convertedStepValue(repo, stepVal); } public String getAddressSpaceName(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 8); return (String) convertedStepValue(repo, stepVal); } public Integer getPriority(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 9); return (Integer) convertedStepValue(repo, stepVal); } public Priority_Assignment_Type getPriorityAssignment(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get(10); return Priority_Assignment_Type.fromString((String) convertedStepValue(repo, stepVal)); } public void initializeCoreObject(StepCoreRepository repo, step.core.StepCoreObject coreObj, StepGenericInstance si) throws Exception { super.initializeCoreObject(repo, coreObj, si); Generic_Resource obj = (Generic_Resource) coreObj; obj.setState(getState(repo, (StepInternalRepresentation) si)); obj.setSize(getSize(repo, (StepInternalRepresentation) si)); obj.setAddress(getAddress(repo, (StepInternalRepresentation) si)); obj.setProtocol(getProtocol(repo, (StepInternalRepresentation) si)); obj.setCriticalSections(getCriticalSections(repo, (StepInternalRepresentation) si)); obj.setCpuName(getCpuName(repo, (StepInternalRepresentation) si)); obj.setAddressSpaceName(getAddressSpaceName(repo, (StepInternalRepresentation) si)); obj.setPriority(getPriority(repo, (StepInternalRepresentation) si)); obj.setPriorityAssignment(getPriorityAssignment(repo, (StepInternalRepresentation) si)); } public StepGenericInstance genericInstance(StepCoreRepository crepo, step.core.StepCoreObject coreObj) throws Exception { StepInternalRepresentation si = (StepInternalRepresentation) super.genericInstance(crepo, coreObj); Generic_Resource obj = (Generic_Resource) coreObj; si.add(stepValueOf(crepo, obj.getState())); si.add(stepValueOf(crepo, obj.getSize())); si.add(stepValueOf(crepo, obj.getAddress())); si.add(stepValueOf(crepo, obj.getProtocol())); si.add(stepValueOf(crepo, obj.getCriticalSections())); si.add(stepValueOf(crepo, obj.getCpuName())); si.add(stepValueOf(crepo, obj.getAddressSpaceName())); si.add(stepValueOf(crepo, obj.getPriority())); si.add(stepValueOf(crepo, obj.getPriorityAssignment())); return si; } }