AI_List Class Reference
[Utilities]

#include <AI_List.h>

List of all members.


Detailed Description

Implement a doubly linked list.

Version:
2.0 nList was ripped from The Nebula Device and renamed to AI_List. Now it is possible to use the class inside and outside Nebula projects.
(C) 2002 RadonLabs GmbH

Public Member Functions

 AI_List ()
 constructor
 ~AI_List ()
 destructor (list must be empty!)
bool IsEmpty () const
 checks if list is empty
AI_NodeGetHead () const
 returns first node in list, 0 if empty
AI_NodeGetTail () const
 returns last node in list, 0 if empty
void AddHead (AI_Node *n)
 add node to head of list
void AddTail (AI_Node *n)
 add node to end of list
AI_NodeRemHead ()
 remove node from head of list
AI_NodeRemTail ()
 remove node from tail of list

Constructor & Destructor Documentation

AI_List::AI_List (  )  [inline]

constructor

AI_List::~AI_List (  )  [inline]

destructor (list must be empty!)

Destroy list object. The list has to be empty, otherwise an assertion will be thrown.


Member Function Documentation

bool AI_List::IsEmpty (  )  const [inline]

checks if list is empty

Returns:
true if list is empty.

AI_Node * AI_List::GetHead (  )  const [inline]

returns first node in list, 0 if empty

Returns:
return first node in list, or 0 if list is empty

AI_Node * AI_List::GetTail (  )  const [inline]

returns last node in list, 0 if empty

Returns:
return last node in list, or 0 if list is empty

void AI_List::AddHead ( AI_Node n  )  [inline]

add node to head of list

Parameters:
n the node to be added

void AI_List::AddTail ( AI_Node n  )  [inline]

add node to end of list

Parameters:
n the node to be added

AI_Node * AI_List::RemHead (  )  [inline]

remove node from head of list

Remove node at head of list, and return pointer to it. Returns 0 if list is empty.

Returns:
the removed node or 0 if list is empty

AI_Node * AI_List::RemTail (  )  [inline]

remove node from tail of list

Remove node at tail of list, and return pointer to it. Returns 0 if list is empty.

Returns:
the removed node or 0 if list is empty


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