GlSList< T > Class Template Reference

A template for a singly-linked list, of the simplest sort. More...

#include <gllist.h>

List of all members.

Public Member Functions

int Size () const
 The number of items in the list -- O(n) performance!
int Count () const
 The number of items in the list -- O(n) performance!
bool Empty () const
 A very fast check for an empty list.
T & Front () const
 Returns the data at the front of the list.
GlSListNode< T > * FrontNode () const
 Get the node, not just the data, at the front of the list.
void Clear ()
 Deletes all the items in the list.
void PushFront (const T &insert)
 Adds an item (by copy) to the list. (Fast).
void PushBack (const T &insert)
 Adds an item (by copy) to the list. (Slower, since it must seek to the end.).
void PopFront ()
 Pull off the root entry in the list.
void Pop (const T &thisone)
 Delete an arbitrary element.
GlSListNode< T > * Find (const T &findthis)
 Find the first occurance of node in the list. Linear search.
bool FindAndDelete (const T &findthis)
 Find and delete instance if found. Do nothing if find fails. Return if delete.


Detailed Description

template<class T>
class GlSList< T >

A template for a singly-linked list, of the simplest sort.

Uses GlSListNodes for members of the list, and can be walked with the GlSListIterator.


Member Function Documentation

template<class T>
void GlSList< T >::Pop ( const T &  thisone  )  [inline]

Delete an arbitrary element.

If elements are repeated, removes the first instance.


The documentation for this class was generated from the following file:
Generated on Thu Jul 20 20:45:32 2006 for Kyra by  doxygen 1.4.7