OMUList 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 OMUList is a typeless, linked list.

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

Construction summary
OMUList
Constructs an OMUList object
~OMUList
Destroys the OMUList object
Flag summary
first - specifies the first element in the list
last - specifies the last element in the list
Method summary
operator []
Returns the element at the specified position.
add - adds the specified element to the end of the list
addat - adds the specified element to the list at the given index
addFirst - adds an element to the beginning of the list
find
Looks for the specified element in the list
getAt
Returns the element found at the specified index
getCount
Returns the number of elements in the list
getCurrent
Is used by the iterator to get the element at the current position in the list
getFirst
Is used by the iterator to get the first position in the list
getNext
Is used by the iterator to get the next position in the list
isEmpty
Determines whether the list is empty
_removeFirst
Removes the first item from the list
remove
Deletes the first occurrence of the specified element from the list
removeAll
Deletes all the elements from the list
removeFirst
Deletes the first element from the list
removeItem
Deletes the specified element from the list
removeLast
Deletes the last element from the list
Flags

first

Specifies the first element in the list. It is defined as follows:
OMUListItem* first;

last

Specifies the last element in the list. It is defined as follows:
OMUListItem* last;

Example

Consider the following example:

OMUIterator iter(itsObserver);
while (*iter)
{
(static_cast<Observer*>(*iter))->notify();
iter++;
}


Feedback