//------------------------------------------------------------------------------- // 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 Named_Object { private static String EntityName = "GENERIC_RESOURCE"; private Integer state_; private Integer size_; private Integer address_; private Resources_Type protocol_; private ArrayList critical_sections_; private String cpu_name_; private String address_space_name_; private Integer priority_; private Priority_Assignment_Type priority_assignment_; 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; critical_sections_ = new ArrayList(); cpu_name_ = ""; address_space_name_ = ""; priority_ = 0; priority_assignment_ = Priority_Assignment_Type.Automatic_Assignment; } 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 setCriticalSections(ArrayList _v) { if (_v == null) { critical_sections_ = null; } else { if (critical_sections_ == null) { critical_sections_ = new ArrayList(); } else { critical_sections_.clear(); } critical_sections_.addAll(_v); } } public void criticalSectionsAdd (Critical_Section _elem) { if (critical_sections_ == null) { critical_sections_ = new ArrayList(); } critical_sections_.add(_elem); } public boolean criticalSectionsRemove(Critical_Section _elem) { if (critical_sections_ != null) { return critical_sections_.remove(_elem); } return false; } public boolean criticalSectionsRemoveAll(ArrayList _v) { if (critical_sections_ != null) { return critical_sections_.removeAll(_v); } return false; } public void criticalSectionsAddAll(ArrayList _v) { if (critical_sections_ == null) { critical_sections_ = new ArrayList(); } critical_sections_.addAll(_v); } public Critical_Section criticalSectionsSet (int _pos, Critical_Section _elem) { return critical_sections_.set(_pos, _elem); } public ArrayList getCriticalSections() { return critical_sections_; } public int criticalSectionsSize () { return critical_sections_ == null ? 0 : critical_sections_.size(); } public Critical_Section criticalSectionsGet (int _pos) { return critical_sections_.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 setPriority ( Integer _v ) { priority_ = _v; } public Integer getPriority() { return priority_; } public void setPriorityAssignment ( Priority_Assignment_Type _v ) { priority_assignment_ = _v; } public Priority_Assignment_Type getPriorityAssignment() { return priority_assignment_; } 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 = getCriticalSections().listIterator(); itori.hasNext(); ) { if (itori.next() == oldObj ) { if (newObj == null) { itori.remove(); } else { itori.set((Critical_Section)newObj); } done = true; } } if (super.replaceReferenceWith(oldObj, newObj)) { done = true; } return done; } }