The OMList class
contains basic library functions that enable you to create and manipulate OMLists.
An OMList is a type-safe, linked list.
This class is defined in the header file omlist.h.
Base template classOMStaticArray
Construction summary- OMList
- Constructs an OMList object
- ~OMList
- Destroys the OMList object
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
- 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
- getFirstConcept
- Returns the first Concept element
in the list
- getLast
- Is used by the iterator to get the last position
in the list
- getLastConcept
- Returns the last Concept element
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
Flagsfirst
Specifies the first element in the list. It is defined
as follows:
OMListItem<Concept>* first;
last
Specifies
the last element in the list. It is defined as follows:
OMListItem<Concept>* last;
ExampleConsider
the following example:
OMIterator<Observer*> iter(itsObserver);
while (*iter)
{
(*iter)->notify();
iter++;
}