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.
 
LinkedList * lExtract (LinkedList *first_item)
 Extracts this instance from the list and ties the list.
 
LinkedList * lPrevious ()
 Get previous item.
 
LinkedList * lNext ()
 Get next item.
 

Static Public Member Functions

static LinkedList * lPushFront (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedList * lPushBack (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedList * preppend (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedList * append (LinkedList *first_item, LinkedList *new_item)
 Inserts the item in the list as the first item.
 
static LinkedList * lPopFront (LinkedList *first_item)
 Removes the first item. More...
 
static LinkedList * lPopBack (LinkedList *first_item)
 Removes the last item. More...
 
static int lCount (LinkedList *first_item)
 Finds out the number of elements in the list.
 
static LinkedList * lClear (LinkedList *first_item)
 Deletes all elements in the list. More...
 
static LinkedList * lItem (LinkedList *first_item, int index)
 Get the item at a particular index. More...
 
static LinkedList * lFirst (LinkedList *first_item)
 Get the first item.
 
static LinkedList * lLast (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: