Array container template. More...
#include <tarray.h>
Public Member Functions | |
TArray (int32 initSize=0, int32 delta=TArrayBase< T >::kDefaultDelta) | |
TArray (const TArray< T > &a) | |
TArray (const TContainer< T > &c) | |
virtual TContainer< T > * | newInstance () const |
virtual int32 | index (const T &t) const |
virtual int32 | shouldGo (const T &t) const |
bool | insertAt (int32 index, const T &t) |
Insert the item at the specified index shifting the other items to make room. | |
bool | replaceAt (int32 index, const T &item) |
Replace item at index. | |
void | quickSort () |
Quick sort the array. |
Array container template.
This container is intended for items that can or should not be sorted.
TArray | ( | int32 | initSize = 0 , |
|
int32 | delta = TArrayBase<T>::kDefaultDelta | |||
) | [inline] |
TArray | ( | const TContainer< T > & | c | ) | [inline] |
virtual TContainer<T>* newInstance | ( | ) | const [inline, virtual] |
Create a copy of this container.
Implements TContainer< T >.
virtual int32 index | ( | const T & | t | ) | const [inline, virtual] |
Get index of item.
Implements TArrayBase< T >.
virtual int32 shouldGo | ( | const T & | t | ) | const [inline, virtual] |
Get index for potential item.
Implements TArrayBase< T >.
bool insertAt | ( | int32 | index, | |
const T & | t | |||
) | [inline] |
Insert the item at the specified index shifting the other items to make room.
bool replaceAt | ( | int32 | idx, | |
const T & | rObj | |||
) | [inline] |
Replace item at index.
"replaceAt" replaces the item at the specified index with the specified item.
void quickSort | ( | ) | [inline] |
Quick sort the array.