Main Page   Class Hierarchy   Compound List   File List   Compound Members  

ctLinkList Class Template Reference

Singly-link list. More...

#include <linklist.h>

List of all members.

Public Methods

void reset ()
 Reset list.

T* get_first ()
 Get first item. set current item to first item.

T* get_next ()
 Get next to current item. set current item to next item.

T* peek_first ()
 Get first item. don't set current item to first item.

void add_link (T *c)
 Add link to front.

void push (T *c)
 Add link to front.

T* pop ()
 Pop first element off list.

void delete_link (T *c)
 Remove and delete link, delete contents.

void remove_link (T *c)
 Remove and delete link, DOESN'T delete contents.

void remove_all ()
 Remove all nodes, doesn't delete contents of nodes.

void delete_all ()
 Remove all nodes, delete contents of nodes.

long get_size ()
 Get number of items in list.

 ctLinkList ()

 ~ctLinkList ()
 Destructor. Clean up nodes. Does NOT delete contents of nodes.

Protected Attributes

llLink<T>* head
llLink<T>* prev
llLink<T>* current
long size

Detailed Description

template<class T> class ctLinkList

Singly-link list.

Uses a sentinel at head. Caches link immediately before most recent access for ease of deletion. Caches more recent link for ease of iteration.

The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000