#include <skAlist.h>
Inheritance diagram for skAList:

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 |
|
|
put at the end of the list
|
|
|
Create the underlying array.
|
|
|
returns the capacity of the current list - i.e. the number of items that can be stored in the underlying array |
|
|
grows the array to the next size
|
|
|
instructs the list to grow to the given size (which must be greater than the current size), the current contents are copied across
|
|
||||||||||||
|
insert *before* the given position
|
|
|
put at the start of the list
|
|
|
An array of pointers to the objects. This can be null |
1.3