next up previous contents
Next: Reference Counting Up: Discussion Previous: Discussion

Organization

Class Collection itself is an abstract base class, meaning that there are no true ``Collection'' objects. However, pointers and references to sets and sequences of the Collection hierarchy have access to a consistent interface, consisting of a set of member function prototypes and a set of comparison operations. The term collection objects is used to refer to instances of classes in the hierarchy. The elements stored in collection objects are considered to come from a totally ordered universe. In order to compile an instantiation of a collection object with a new element type A, the following operations must be defined: The collection objects available to the programmer are listed below and defined completely in the subsections to follow. The comparison methods of set objects (MSetBase, MSet, SetBase, Set) work under the assumption that the elements are stored in lexicographic order. Therefore, in order for these operations to work correctly, the underlying Container implementation must store the elements in sorted order, or at least be capable of iterating through the elements in sorted order. With this restriction in mind, it is possible to introduce new Container objects into LINK and use them as Collection implementations.
next up previous contents
Next: Reference Counting Up: Discussion Previous: Discussion
RHS Linux User
1/26/1998