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

skAList Class Reference

Array-Based List of pointers with template sub-classes. More...

#include <skAlist.h>

Inheritance diagram for skAList:

skTAList< T > skTAList< skAttribute > skTAList< skIdNode > skTAList< skNode > skTAList< skParseNode > skTAList< skTreeNode > skAttributeList skNodeList skTreeNodeList List of all members.

Public Member Functions

virtual ~skAList ()
 does NOT destroy items, this is done in the derived class

IMPORT_C void clearAndDestroy ()
 deletes all items in the list, calling deleteItem on each one

IMPORT_C void clear ()
 removes all items from the list, without deleting

USize entries () const
 returns the number of items in the list

IMPORT_C void deleteElt (USize n)
 removes and deletes the nth item in the list, deleteItem is called to delete the item

IMPORT_C void test () const
 performs some checks on the list

IMPORT_C void growTo (USize size)
 instructs the list to grow to the given size (which must be greater than the current size), the current contents are copied across

USize getArraySize () const
 returns the capacity of the current list - i.e.


Protected Member Functions

 skAList ()
 default constructor - makes initial size zero

void insert (void *, USize index)
 insert *before* the given position

void prepend (void *)
 put at the start of the list

void append (void *)
 put at the end of the list

void remove (void *)
 remove an item, but *not* delete it

void removeAndDestroy (void *)
 remove an item and delete it

void * operator[] (USize n) const
 retrieves the nth item within the list, a BoundsException is thrown if the index is out of range

int index (const void *) const
 returns the index of the given object, or -1 if not found

bool contains (const void *) const
 returns true if the given object is in the list

virtual void deleteItem (void *)=0
 this method is overriden in the derived classes so that the correct destructor is called

int findElt (const void *i) const
 searches for an element, returns -1 if not found

IMPORT_C void grow ()
 grows the array to the next size

IMPORT_C void createArray ()
 Create the underlying array.


Protected Attributes

void ** m_Array
 An array of pointers to the objects.

USize m_ArraySize
 this gives the actual size of the array of pointers

USize m_Entries
 this gives the number of slots which are currently being used


Friends

class skAListIterator

Detailed Description

Array-Based List of pointers with template sub-classes.


Member Function Documentation

void skAList::append void *   )  [inline, protected]
 

put at the end of the list

Exceptions:
Symbian - a leaving function

IMPORT_C void skAList::createArray  )  [protected]
 

Create the underlying array.

Exceptions:
Symbian - a leaving function

USize skAList::getArraySize  )  const [inline]
 

returns the capacity of the current list - i.e.

the number of items that can be stored in the underlying array

IMPORT_C void skAList::grow  )  [protected]
 

grows the array to the next size

Exceptions:
Symbian - a leaving function

IMPORT_C void skAList::growTo USize  size  ) 
 

instructs the list to grow to the given size (which must be greater than the current size), the current contents are copied across

Exceptions:
Symbian - a leaving function

void skAList::insert void *  ,
USize  index
[protected]
 

insert *before* the given position

Exceptions:
Symbian - a leaving function

void skAList::prepend void *   )  [protected]
 

put at the start of the list

Exceptions:
Symbian - a leaving function


Member Data Documentation

void** skAList::m_Array [protected]
 

An array of pointers to the objects.

This can be null


The documentation for this class was generated from the following file:
Generated on Fri Dec 17 20:28:26 2004 for Simkin C++ for Symbian by doxygen1.3