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

skTAList Template Class Reference

This template class is used to provide type-safety to the list. More...

#include <skAlist.h>

Inheritance diagram for skTAList:

skAList List of all members.

Public Methods

 skTAList ()
 default constructor.

 skTAList (const skTAList<T>&)
 Copy constructor - does a deep copy.

 skTAList (USize initial_size,USize growth_increment)
 Constructor specifying the size and growth increment for the list.

virtual ~skTAList ()
 Destructor deletes all the contained objects by calling clearAndDestroy.

void insert (T *,USize index)
 inserts the object *before* the given index.

void prepend (T *)
 puts the object at the start of the list.

void append (T *)
 puts the object at the end of the list.

void remove (T *)
 removes the given object from the list, but does not delete it.

void removeAndDestroy (T *)
 removes the given object from the list and deletes it.

T* operator[] (USize n) const
 retrieves the object at the nth position in the list.

int index (const T *) const
 returns the index of the item in the list, or -1 if not found.

bool contains (const T *) const
 returns true if the list contains the given object.

skTAList<T>& operator= (const skTAList<T>& l)
 assignment operator - clears and destroys this list, and then does a deep copy.


Protected Methods

void deleteItem (void *)
 this method calls delete on the object casted to the correct type, this ensures the destructor is called.


Detailed Description

template<class T> template class skTAList

This template class is used to provide type-safety to the list.


The documentation for this class was generated from the following files:
Generated at Wed May 9 11:32:22 2001 for Simkin by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000