Logo Search packages:      
Sourcecode: ragel version File versions

DList< DLMEL_TEMPDEF > Class Template Reference
[Dlist]

#include <dlist.h>

List of all members.


Detailed Description

template<DLMEL_TEMPDEF>
class DList< DLMEL_TEMPDEF >

Basic doubly linked list.

DList is the standard by-structure list type. This class requires the programmer to declare a list element type that has the necessary next and previous pointers in it. This can be achieved by inheriting from the DListEl class or by simply adding next and previous pointers directly into the list element class.

DList does not assume ownership of elements in the tree. Items must be explicitly de-allocated.

Definition at line 109 of file dlcommon.h.


Public Member Functions

void abandon ()
 Clear the list by forgetting all elements.
void addAfter (Element *prev_el, DList &dl)
void addAfter (Element *prev_el, Element *new_el)
 Insert an element immediately after an element in the list.
void addBefore (Element *next_el, DList &dl)
void addBefore (Element *next_el, Element *new_el)
 Insert an element immediatly before an element in the list.
void append (DList &dl)
 Append an entire list to the end of the list.
void append (Element *new_el)
 Append a single element to the end of the list.
void deepCopy (const DList &other)
 Perform a deep copy of the list.
Element * detach (Element *el)
 Detach an element from the list.
Element * detachFirst ()
 Detach the head of the list.
Element * detachLast ()
 Detach the tail of the list.
 DList (const DList &other)
 Perform a shallow copy of the list.
 DList ()
 Initialize an empty list.
void empty ()
 Clear the list by deleting all elements.
IterFirst first ()
 Return first element.
IterLast last ()
 Return last element.
long length () const
 The number of elements in the list.
DListoperator= (const DList &other)
 Perform a shallow copy of the list.
void prepend (DList &dl)
 Prepend an entire list to the beginning of this list.
void prepend (Element *new_el)
 Prepend a single element to the front of the list.
void remove (Element *el)
 Detach and delete an element from the list.
void removeFirst ()
 Detach and delete the first element in the list.
void removeLast ()
 Detach and delete the last element in the list.
void shallowCopy (const DList &other)
 Shallow copy another list into this list.
long size () const
 ~DList ()
 Abandon all elements in the list.

Public Attributes

Element * head
 Head and tail of the linked list.
long listLen
 The number of element in the list.
Element * tail

Classes

struct  Iter
 Double List Iterator. More...
struct  IterFirst
struct  IterLast
struct  IterNext
struct  IterPrev

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index