#include <skAlist.h>
Inheritance diagram for skTAList< T >:
Public Member Functions | |
skTAList () | |
default constructor | |
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 Member Functions | |
void | deleteItem (void *) |
this method calls delete on the object casted to the correct type, this ensures the destructor is called |
|
puts the object at the end of the list
|
|
inserts the object *before* the given index
|
|
puts the object at the start of the list
|