Classes | |
| class | ArrayList |
| A mostly complete array-list implementation of List. More... | |
| class | Container |
| Abstract base class for all containers. More... | |
| class | Entity |
| The base class of all items that can be stored in a Container. More... | |
| class | LinkedList |
| A mostly complete linked-list implementation of List. More... | |
| class | List |
| Abstract base class for all list containers. More... | |
| class | Object |
| The root for most classes in the container namespace. More... | |
| class | OrderedArrayList |
| An array list implementation of OrderedList. More... | |
| class | OrderedLinkedList |
| A linked list implementation of OrderedList. More... | |
| class | OrderedList |
| An ADT that represents a list of items. More... | |
| class | Queue |
| Abstract base class for all queue containers. More... | |
| class | QueueImpl |
| An implementation of Queue that based on an OrderedList. More... | |
| class | SortedArrayList |
| An array implementation of SortedList. More... | |
| class | SortedLinkedList |
| A linked list implementation of SortedList. More... | |
| class | SortedList |
| Abstract base class for all sorted lists. More... | |
| class | Stack |
| Abstract base class for all stack containers. More... | |
| class | StackImpl |
| An implementation of Stack that based on an OrderedList. More... | |
Functions | |
| ostream & | operator<< (ostream &os, const Object &object) |
| ostream & | operator<< (ostream &os, const Object *object) |
| ostream& container::operator<< | ( | ostream & | os, | |
| const Object * | object | |||
| ) |
Polymorphic behavior is achieved by calling Object::renderState(ostream&) on object. Parameter object is a pointer type and Object::renderState(ostream&) is a virtual method; therefore, a polymorphic determination is made as to which Object::renderState(ostream&) method to call. The determination is made at runtime (not compile time), and the winning candidate will be the method furthest down the inheritance chain with a matching signature.
This only works when an object is referred to by a pointer or by a reference.
00085 { 00086 if (object == NULL) 00087 // At this point there doesn't seem to be anyway to determine the 00088 // type of reference that was null. 00089 return os << "NULL"; 00090 else 00091 return object->renderState(os); 00092 }
| ostream& container::operator<< | ( | ostream & | os, | |
| const Object & | object | |||
| ) |
Polymorphic behavior is achieved by calling Object::renderState(ostream&) on object. Parameter object is a reference type and Object::renderState(ostream&) is a virtual method; therefore, a polymorphic determination is made as to which Object::renderState(ostream&) method to call. The determination is made at runtime (not compile time), and the winning candidate will be the method furthest down the inheritance chain with a matching signature.
This only works when an object is referred to by a pointer or by a reference.
00076 { 00077 if (&object == NULL) 00078 // At this point there doesn't seem to be anyway to determine the 00079 // type of reference that was null. 00080 return os << "NULL"; 00081 else 00082 return object.renderState(os); 00083 }
1.5.9