//------------------------------------------------------------------------------- // 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_Resource extends Generic_Object { private static String EntityName = "GENERIC_RESOURCE"; private Integer state_; private Integer size_; private Integer address_; private Resources_Type protocol_; private ArrayList task_tab_; private String cpu_name_; private String address_space_name_; 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(); state_ = 0; size_ = 0; address_ = 0; protocol_ = Resources_Type.No_Protocol; task_tab_ = new ArrayList(); cpu_name_ = ""; address_space_name_ = ""; } public Generic_Resource () { initializeExplicitAttributes(); } public Generic_Resource (step.core.StepCoreRepository _repo) { super(_repo); initializeExplicitAttributes(); } public void setState ( Integer _v ) { state_ = _v; } public Integer getState() { return state_; } public void setSize ( Integer _v ) { size_ = _v; } public Integer getSize() { return size_; } public void setAddress ( Integer _v ) { address_ = _v; } public Integer getAddress() { return address_; } public void setProtocol ( Resources_Type _v ) { protocol_ = _v; } public Resources_Type getProtocol() { return protocol_; } public void setTaskTab(ArrayList _v) { if (_v == null) { task_tab_ = null; } else { if (task_tab_ == null) { task_tab_ = new ArrayList(); } else { task_tab_.clear(); } task_tab_.addAll(_v); } } public void taskTabAdd (Task_List_Element _elem) { if (task_tab_ == null) { task_tab_ = new ArrayList(); } task_tab_.add(_elem); } public boolean taskTabRemove(Task_List_Element _elem) { if (task_tab_ != null) { return task_tab_.remove(_elem); } return false; } public boolean taskTabRemoveAll(ArrayList _v) { if (task_tab_ != null) { return task_tab_.removeAll(_v); } return false; } public void taskTabAddAll(ArrayList _v) { if (task_tab_ == null) { task_tab_ = new ArrayList(); } task_tab_.addAll(_v); } public Task_List_Element taskTabSet (int _pos, Task_List_Element _elem) { return task_tab_.set(_pos, _elem); } public ArrayList getTaskTab() { return task_tab_; } public int taskTabSize () { return task_tab_ == null ? 0 : task_tab_.size(); } public Task_List_Element taskTabGet (int _pos) { return task_tab_.get(_pos); } 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 accept(CheddarBridge_AbstractVisitor visitor ) { visitor.accept((Generic_Resource) this); } public step.core.StepCoreObjectReaderWriter readerWriter() { return new Generic_ResourceStepRW(); } public boolean replaceReferenceWith(StepCoreObject oldObj, StepCoreObject newObj) { boolean done = false; for (ListIterator itori = getTaskTab().listIterator(); itori.hasNext(); ) { if (itori.next() == oldObj ) { if (newObj == null) { itori.remove(); } else { itori.set((Task_List_Element)newObj); } done = true; } } if (super.replaceReferenceWith(oldObj, newObj)) { done = true; } return done; } }