#include <orderedlinkedlist.h>
Public Member Functions | |
OrderedLinkedList () | |
OrderedLinkedList (const OrderedLinkedList &orig) | |
virtual | ~OrderedLinkedList () |
virtual ostream & | renderState (ostream &os) const |
Write the state of an Object for debugging and demonstration. | |
virtual const Info * | typeInfo () const |
Return the instance of Object::Info that describes the class of this object. | |
virtual Object * | clone (bool deepCopy=false) const |
A polymorphic copy constructor. | |
Static Public Attributes | |
static const Info *const | TYPE_INFO = Object::typeInfoFactory("OrderedLinkedList") |
Protected Member Functions | |
virtual void | append_impl (Entity *entity) |
Called by a template method. | |
virtual void | insertBefore_impl (Entity *entity) |
Called by a template method. | |
virtual bool | add_impl (Entity *entity) |
Called by a template method. |
container::OrderedLinkedList::OrderedLinkedList | ( | const OrderedLinkedList & | orig | ) |
bool container::OrderedLinkedList::add_impl | ( | Entity * | entity | ) | [protected, virtual] |
Called by a template method.
Implements container::List.
00065 { 00066 append_impl(entity); 00067 return true; 00068 }
void container::OrderedLinkedList::append_impl | ( | Entity * | entity | ) | [protected, virtual] |
Called by a template method.
Implements container::OrderedList.
00055 { 00056 new Node(entity, tail); 00057 }
Object * container::OrderedLinkedList::clone | ( | bool | deepCopy = false |
) | const [virtual] |
void container::OrderedLinkedList::insertBefore_impl | ( | Entity * | entity | ) | [protected, virtual] |
Called by a template method.
Implements container::OrderedList.
00059 { 00060 new Node(entity, current); 00061 }
ostream & container::OrderedLinkedList::renderState | ( | ostream & | os | ) | const [virtual] |
Write the state of an Object for debugging and demonstration.
This method must not change the state of an Object; adding or removing debug statements should not change the behavior of a class. The implementation must be robust, e.g., NULL safe, etc. and work without an unrecoverable error for any state, excluding an Object's time of construction and destruction. It is not required for the implementation to be thread safe.
Reimplemented from container::LinkedList.
00072 { 00073 return this->LinkedList::renderState(os); 00074 }
const Object::Info * container::OrderedLinkedList::typeInfo | ( | ) | const [virtual] |
Return the instance of Object::Info that describes the class of this object.
Instantiation of Object::Info is controlled by the protected method Object::typeInfoFactory(const string&). Each sub-class of Object should create one and only one instance of Object::Info.
Reimplemented from container::LinkedList.
00076 { 00077 return TYPE_INFO; 00078 }
const Object::Info *const container::OrderedLinkedList::TYPE_INFO = Object::typeInfoFactory("OrderedLinkedList") [static] |
Reimplemented from container::LinkedList.