OMUCollection class

In Rational® Rhapsody®, omu* containers are containers that are not implemented with templates. The use of template-free containers reduces the size of the generated code considerably. An OMUCollection is a typeless, dynamically sized array.

This class is defined in the header file omucollec.h.

Attribute summary
count - specifies the number of elements in the collection
theLink - specifies the link to the element in the collection
size - specifies the amount of memory allocated for the collection
Construction summary
OMUCollection
Constructs an OMUCollection object
~OMUCollection
Destroys the OMUCollection object
Method summary
operator []
Returns the element at the specified position
add - adds the specified element to the collection
addAt - adds the specified element to the collection at the given index
find
Looks for the specified element in the collection
getAt
Returns the element found at the specified index
getCount
Returns the number of elements in the collection
getCurrent
Is used by the iterator to get the element at the current position in the collection
getFirst
Is used by the iterator to get the first position in the collection
getNext
Is used by the iterator to get the next position in the collection
getSize
Gets the size of the memory allocated for the collection
isEmpty
Determines whether the collection is empty
remove
Deletes the specified element from the collection
removeAll
Deletes all the elements from the collection
removeByIndex
Deletes the element found at the specified index in the collection
reorganize
Reorganizes the contents of the collection
setAt
Inserts the specified element at the given index in the collection
Attributes

count

This attribute specifies the number of elements in the collection. It is defined as follows:

int count;

theLink

This attribute specifies the link to an element in the collection. It is defined as follows:

void** theLink;

size

This attribute specifies the amount of memory allocated for the collection. It is defined as follows

int size;

Feedback