Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CList Class Reference

Basic Linked List data structure using CListItem as nodes. More...

#include <CDataStructures.h>

Inheritance diagram for CList::

CAddressBook CCalendar CMemoList CPlayList CUserPlayLists List of all members.

Public Methods

 CList (void)
 ~CList (void)
void gotoHead (void)
 Sets the internal current item ptr to the head of the list. More...

void gotoTail (void)
 Sets the internal current item ptr to the tail of the list. More...

void next (void)
 Sets the internal current item ptr to the next item in the list. More...

void prev (void)
 Sets the internal current item ptr to the previous item in the list. More...

CListItemgetItem (void)
 Returns the internal pointer. More...

CListItemgetItem (int number)
 Returns the item that is in position number, where the head is 1. More...

int getLength (void)
 Returns the number of items in the list. More...

void appendItem (CListItem *item)
 Appends the item to the tail of the list. More...

void prependItem (CListItem *item)
 Prepends the item to the tail of the list. More...

void insertItem (CListItem *item, int number)
 Insert item into list at position number. More...

void deleteItem (CListItem *item)
 Delete given item from the list, where 1 is the head of the list. More...

bool deleteItem (int number)
 Delete the item at position number, where 1 is the head the list. More...


Protected Attributes

int m_length
CListItemm_head
CListItemm_tail
CListItemm_current

Detailed Description

Basic Linked List data structure using CListItem as nodes.


Constructor & Destructor Documentation

CList::CList void   
 

CList::~CList void   
 


Member Function Documentation

void CList::appendItem CListItem   item
 

Appends the item to the tail of the list.

bool CList::deleteItem int    number
 

Delete the item at position number, where 1 is the head the list.

Reimplemented in CPlayList.

void CList::deleteItem CListItem   item
 

Delete given item from the list, where 1 is the head of the list.

CListItem * CList::getItem int    number
 

Returns the item that is in position number, where the head is 1.

Returns NULL if the number is out of range for the list.

Reimplemented in CMemoList, CAddressBook, CCalendar, CPlayList, and CUserPlayLists.

CListItem * CList::getItem void   
 

Returns the internal pointer.

Reimplemented in CMemoList, CAddressBook, CCalendar, CPlayList, and CUserPlayLists.

int CList::getLength void   
 

Returns the number of items in the list.

void CList::gotoHead void   
 

Sets the internal current item ptr to the head of the list.

void CList::gotoTail void   
 

Sets the internal current item ptr to the tail of the list.

void CList::insertItem CListItem   item,
int    number
 

Insert item into list at position number.

void CList::next void   
 

Sets the internal current item ptr to the next item in the list.

If the current ptr is at the tail, it remains pointing to the tail

void CList::prependItem CListItem   item
 

Prepends the item to the tail of the list.

void CList::prev void   
 

Sets the internal current item ptr to the previous item in the list.

If the current ptr is at the head, it remains pointing to the head


Member Data Documentation

CListItem* CList::m_current [protected]
 

CListItem* CList::m_head [protected]
 

int CList::m_length [protected]
 

CListItem* CList::m_tail [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 6 00:14:54 2001 for Dijinni by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001