#include <gllist.h>
Public Methods | |
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. More... | |
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. |
Uses GlSListNodes for members of the list, and can be walked with the GlSListIterator.
|
Delete an arbitrary element. If elements are repeated, removes the first instance. |