Go to the first, previous, next, last section, table of contents.
The library is built around several protocols:
-
The <Collecting> protocol is root of the collection protocol heirarchy.
The <Collecting> protocol defines the most general interface to a
collection of elements. Elements can be added, removed, and replaced.
The contents can be tested, enumerated, and enumerated through various
filters. Elements may be objects, or any C type included in the
"elt" union given in elt.h, but all elements of a collection must be of
the same C type.
(For examples see Set and Bag.)
-
The <KeyedCollecting> protocol inherits from the <Collecting> protocol.
The <KeyedCollecting> protocol defines the interface to a
collection of elements that are accessible by a key, where the key is
some unique element. Pairs of (key element, content element) may be
added, removed and replaced. The keys and contents may be tested,
enumerated, and copied.
(For examples see Dictionary and MappedCollector.)
-
The <IndexedCollecting> protocol inherits from the
<KeyedCollecting> protocol.
The <IndexedCollecting> protocol defines the interface to a
collection of elements that are accessible by a key that is an index,
where the indeces in a collection are a contiguous series of unsigned
integers beginning at 0. This is the root of the protocol heirarchy
for all collections that hold their elements in some order. Elements
may be accessed, inserted, replaced and removed by their index.
(For examples see Array and LinkedList.)
-
The <LinkedListComprising> protocol defines the interface to an object
that may be an element in a LinkedList. LinkedList is a collection
object based on a doubly linked list.
(For an example see LinkedListNode.)
-
The <BinaryTreeComprising> protocol defines the interface to an object
that may be an element in a BinaryTree. BinaryTree is a collection
object based on a binary trees.
(For an example see BinaryTreeNode.)
Here is the object inheritance heirarchy. All collection abtract
superclasses (classes which are not usable without subclassing) end
with "Collection"; all protocols end with "ing"; all collection
protocols end with "Collecting".
Collection <Collecting>
Set
Bag
KeyedCollection <KeyedCollecting>
Dictionary
MappedCollector
IndexedCollection <IndexedCollecting>
Array
Stack
GapArray
CircularArray
Queue
Heap
LinkedList
BinaryTree
RBTree
EltNodeCollector
String
DelegateList
HashTable
List
Storage
<<This section unfinished.>>
Go to the first, previous, next, last section, table of contents.