name: DoubleLinkedList<class TObject> : public DstrBase;

synopsis:

g++ [flags ...] file ...

#include <DoubleLinkedList.h>

DoubleLinkedList(ALLOCATION alloc_d = DEF_ALLOCATION);
boolean insert(TObject* item);
boolean insertFirst(TObject* item);
boolean removeLast(TObject*& item);
const TObject* getPrev() const;
quick start:

// declare a character list and add two characters into it
//
DoubleLinkedList<Char> list;
Char item0(L'a');
Char item1(L'b');
list.insertFirst(&item0);
list.insert(&item1);

// get the last character
//
list.gotoLast();
Char* item2 = list.getCurr();
if (item2->ne(item1)) {
   // error
}
description:

The DoubleLinkedList class, as its name suggests is a list template class that supports list processing using a data structure that contains a pointer to the next and previous elements in the list. (A single linked list, by constrast, contains a pointer only to the next node). For a good reference on lists, see: The user may select the memory management mode in which this class operates: USER or SYSTEM. In SYSTEM mode, the class is responsible for managing the memory for the objects it contains. This implies that a copy is made each time an object is inserted to the list. In USER mode the user is responsible for allocation and deletion of the objects that are stored in the list. In this mode, pointers to the external objects are stored - a copy is not made. The best mode for your application depends on your need to trade-off speed versus the complexity of object management.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

friend classes:

examples:

notes: