Hasty Badger
Small UI library (a branch of Turbo Badger)
|
TBListAutoDeleteOf is a list (array) of pointers to the specified object type. More...
#include <tb_list.h>
Additional Inherited Members | |
Public Member Functions inherited from tb::TBListOf< T > | |
bool | Reserve (int num) |
Make sure there is space for at least num items in the list. More... | |
bool | GrowIfNeeded () |
Make sure there is space for at least one more item in the list. More... | |
bool | Add (T *data) |
Add data at the end of the list. More... | |
bool | Add (T *data, int index) |
Add data at the given index in the list. More... | |
void | Set (T *data, int index) |
Replace the item at the index with the new data. | |
T * | Get (int index) const |
Returns the content at position index. More... | |
T * | operator[] (int index) const |
Returns the content at position index. More... | |
T * | RemoveFast (int index) |
Remove the item at position index from the list and returns the pointer. More... | |
T * | Remove (int index) |
Remove the item at position index from the list and returns the pointer. More... | |
void | DeleteFast (int index) |
Deletes the item at position index after removing it from the list. More... | |
void | Delete (int index) |
Deletes the item at position index after removing it from the list. More... | |
void | RemoveAll () |
Remove all items without deleding them. More... | |
void | DeleteAll () |
Remove and delete all items from the list. More... | |
void | Swap (int index1, int index2) |
Swap the items at index1 and index2. | |
int | Find (T *data) const |
Search for the item with the given data and return the found index, or -1 if not found. More... | |
int | GetNumItems () const |
Get the number of items in the list. More... | |
int | GetCapacity () const |
Get the capacity of the list number of items it can hold without allocating more memory) | |
TBListAutoDeleteOf is a list (array) of pointers to the specified object type.
The objects will be deleted automatically on destruction.