List Classes

The StringList class is derived from the SequentialList class. This class is widely used within MLDesigner to provide list functionality. It implements a linked list with a running count of the number of elements.


The SequentialList Class uses the generic pointer technique with

typedef void* Pointer
Thus, items in a sequential list can be pointers to any object, with a generic pointer used to access the object. In derived classes, like StringList, this generic pointer is converted to a specific type of pointer, like const char*. The methods are summarized in table Class SequentialList .An important point to keep in mind when using a SequentialList is that its destructor does not delete the elements in the list. It would not be possible to do so, since it has only a generic pointer. Also, note that random access (by element number, or any other method) can be very inefficient, since it would require sequentially chaining down the list. SequentialList has an iterator class called ListIter. The ++ operator (or next member function) returns a Pointer.


The Queue Class is privately derived from SequentialList. It can implement either a first-in / first-out (FIFO) queue, or a last-in / first-out (LIFO) queue.


The Stack Class is privately derived from SequentialList. It implements a stack, which is equivalent to a LIFO queue.