//------------------------------------------------------------------------------- // 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 step.core.*; public class Generic_Task extends Generic_Object { private static String EntityName = "GENERIC_TASK"; private Tasks_Type task_type_; private String cpu_name_; private String address_space_name_; private Integer capacity_; private Integer deadline_; private Integer start_time_; private Integer priority_; private Integer blocking_time_; private Policies policy_; private Integer x_; private Integer y_; private ArrayList offset_; private Integer text_memory_size_; private Integer stack_memory_size_; private ArrayList param_; private Integer criticality_; private Integer context_switch_overhead_; public static String EntityName() { return EntityName; } public String entityName() { return EntityName(); } public boolean isInstanceOf(String entName) { return entName.equals(EntityName); } public boolean isKindOf(String entName) { return entName.equals(EntityName) ? true : super.isKindOf(entName); } public void initializeExplicitAttributes() { super.initializeExplicitAttributes(); task_type_ = Tasks_Type.Periodic_Type; cpu_name_ = ""; address_space_name_ = ""; capacity_ = 0; deadline_ = 0; start_time_ = 0; priority_ = 0; blocking_time_ = 0; policy_ = Policies.Sched_Fifo; x_ = 0; y_ = 0; offset_ = new ArrayList(); text_memory_size_ = 0; stack_memory_size_ = 0; param_ = new ArrayList(); criticality_ = 0; context_switch_overhead_ = 0; } public Generic_Task () { initializeExplicitAttributes(); } public Generic_Task (step.core.StepCoreRepository _repo) { super(_repo); initializeExplicitAttributes(); } public void setTaskType ( Tasks_Type _v ) { task_type_ = _v; } public Tasks_Type getTaskType() { return task_type_; } public void setCpuName ( String _v ) { cpu_name_ = _v; } public String getCpuName() { return cpu_name_; } public void setAddressSpaceName ( String _v ) { address_space_name_ = _v; } public String getAddressSpaceName() { return address_space_name_; } public void setCapacity ( Integer _v ) { capacity_ = _v; } public Integer getCapacity() { return capacity_; } public void setDeadline ( Integer _v ) { deadline_ = _v; } public Integer getDeadline() { return deadline_; } public void setStartTime ( Integer _v ) { start_time_ = _v; } public Integer getStartTime() { return start_time_; } public void setPriority ( Integer _v ) { priority_ = _v; } public Integer getPriority() { return priority_; } public void setBlockingTime ( Integer _v ) { blocking_time_ = _v; } public Integer getBlockingTime() { return blocking_time_; } public void setPolicy ( Policies _v ) { policy_ = _v; } public Policies getPolicy() { return policy_; } public void setX ( Integer _v ) { x_ = _v; } public Integer getX() { return x_; } public void setY ( Integer _v ) { y_ = _v; } public Integer getY() { return y_; } public void setOffset(ArrayList _v) { if (_v == null) { offset_ = null; } else { if (offset_ == null) { offset_ = new ArrayList(); } else { offset_.clear(); } offset_.addAll(_v); } } public void offsetAdd (Offset_Type _elem) { if (offset_ == null) { offset_ = new ArrayList(); } offset_.add(_elem); } public boolean offsetRemove(Offset_Type _elem) { if (offset_ != null) { return offset_.remove(_elem); } return false; } public boolean offsetRemoveAll(ArrayList _v) { if (offset_ != null) { return offset_.removeAll(_v); } return false; } public void offsetAddAll(ArrayList _v) { if (offset_ == null) { offset_ = new ArrayList(); } offset_.addAll(_v); } public Offset_Type offsetSet (int _pos, Offset_Type _elem) { return offset_.set(_pos, _elem); } public ArrayList getOffset() { return offset_; } public int offsetSize () { return offset_ == null ? 0 : offset_.size(); } public Offset_Type offsetGet (int _pos) { return offset_.get(_pos); } public void setTextMemorySize ( Integer _v ) { text_memory_size_ = _v; } public Integer getTextMemorySize() { return text_memory_size_; } public void setStackMemorySize ( Integer _v ) { stack_memory_size_ = _v; } public Integer getStackMemorySize() { return stack_memory_size_; } public void setParam(ArrayList _v) { if (_v == null) { param_ = null; } else { if (param_ == null) { param_ = new ArrayList(); } else { param_.clear(); } param_.addAll(_v); } } public void paramAdd (Parameter _elem) { if (param_ == null) { param_ = new ArrayList(); } param_.add(_elem); } public boolean paramRemove(Parameter _elem) { if (param_ != null) { return param_.remove(_elem); } return false; } public boolean paramRemoveAll(ArrayList _v) { if (param_ != null) { return param_.removeAll(_v); } return false; } public void paramAddAll(ArrayList _v) { if (param_ == null) { param_ = new ArrayList(); } param_.addAll(_v); } public Parameter paramSet (int _pos, Parameter _elem) { return param_.set(_pos, _elem); } public ArrayList getParam() { return param_; } public int paramSize () { return param_ == null ? 0 : param_.size(); } public Parameter paramGet (int _pos) { return param_.get(_pos); } public void setCriticality ( Integer _v ) { criticality_ = _v; } public Integer getCriticality() { return criticality_; } public void setContextSwitchOverhead ( Integer _v ) { context_switch_overhead_ = _v; } public Integer getContextSwitchOverhead() { return context_switch_overhead_; } public void accept(CheddarBridge_AbstractVisitor visitor ) { visitor.accept((Generic_Task) this); } public step.core.StepCoreObjectReaderWriter readerWriter() { return new Generic_TaskStepRW(); } public boolean replaceReferenceWith(StepCoreObject oldObj, StepCoreObject newObj) { boolean done = false; for (ListIterator itori = getOffset().listIterator(); itori.hasNext(); ) { if (itori.next() == oldObj ) { if (newObj == null) { itori.remove(); } else { itori.set((Offset_Type)newObj); } done = true; } } for (ListIterator itori = getParam().listIterator(); itori.hasNext(); ) { if (itori.next() == oldObj ) { if (newObj == null) { itori.remove(); } else { itori.set((Parameter)newObj); } done = true; } } if (super.replaceReferenceWith(oldObj, newObj)) { done = true; } return done; } }