LinkedList Pile   version 0.0.1
LinkedList pile.
LinkedList Class Reference

A double-linked list. More...

#include <linkedlist.h>

Public Member Functions

 LinkedList ()
 constructor
 
virtual ~LinkedList ()
 destructor
 
int lNextCount ()
 Finds out the number of elements that follow this one in the list.
 
LinkedListlExtract (LinkedList *first_item)
 Extracts this instance from the list and ties the list.
 
LinkedListlPrevious ()
 Get previous item.
 
LinkedListlNext ()
 Get next item.
 

Static Public Member Functions

static LinkedListlPushFront (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedListlPushBack (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedListpreppend (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedListappend (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedListlPopFront (LinkedList *first_item)
 Removes the first item. More...
 
static LinkedListlPopBack (LinkedList *first_item)
 Removes the last item. More...
 
static int lCount (LinkedList *first_item)
 Finds out the number of elements in the list.
 
static LinkedListlClear (LinkedList *first_item)
 Deletes all elements in the list. More...
 
static LinkedListlItem (LinkedList *first_item, int index)
 Get the item at a particular index. More...
 
static LinkedListlFirst (LinkedList *first_item)
 Get the first item.
 
static LinkedListlLast (LinkedList *first_item)
 Get the last item. More...
 

Detailed Description

A double-linked list.

Detailed description.

Member Function Documentation

LinkedList * LinkedList::lClear ( LinkedList first_item)
static

Deletes all elements in the list.

Parameters
first_itemPointer to header item for the list.
Returns
new header item for the list - always NULL
LinkedList * LinkedList::lItem ( LinkedList first_item,
int  index 
)
static

Get the item at a particular index.

Parameters
first_itemPointer to header item for the list.
indexthe item to retreive
Returns
the requested item or NULL if out of bounds
LinkedList * LinkedList::lLast ( LinkedList first_item)
static

Get the last item.

Parameters
first_itemPointer to header item for the list.
Returns
the requested item or NULL if the list is empty
LinkedList * LinkedList::lPopBack ( LinkedList first_item)
static

Removes the last item.

Warning
The item is NOT deleted, it is simply extracted from the list.
Parameters
first_itemPointer to header item for the list.
Returns
new header item for the list
LinkedList * LinkedList::lPopFront ( LinkedList first_item)
static

Removes the first item.

Warning
The item is NOT deleted, it is simply extracted from the list.
Parameters
first_itemPointer to header item for the list.
Returns
new header item for the list

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