#include <skAlist.h>
Inheritance diagram for skTAList:
Public Methods | |
skTAList () | |
default constructor. | |
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. | |
Protected Methods | |
void | deleteItem (void *) |
this method calls delete on the object casted to the correct type, this ensures the destructor is called. |