Torque2D Reference
|
#include <platformFont.h>
Public Member Functions | |
Vector (const U32 initialSize=0) | |
Vector (const U32 initialSize, const char *fileName, const U32 lineNum) | |
Vector (const char *fileName, const U32 lineNum) | |
Vector (const Vector &) | |
~Vector () | |
void | setFileAssociation (const char *file, const U32 line) |
Protected Member Functions | |
bool | resize (U32) |
void | destroy (U32 start, U32 end) |
Destructs elements from start to end-1 More... | |
void | construct (U32 start, U32 end) |
Constructs elements from start to end-1 More... | |
void | construct (U32 start, U32 end, const T *array) |
Protected Attributes | |
U32 | mElementCount |
U32 | mArraySize |
T * | mArray |
const char * | mFileAssociation |
U32 | mLineAssociation |
STL interface | |
typedef T | value_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | iterator |
typedef const T * | const_iterator |
typedef S32 | difference_type |
typedef U32 | size_type |
typedef difference_type(QSORT_CALLBACK * | compare_func )(const T *a, const T *b) |
Vector< T > & | operator= (const Vector< T > &p) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
S32 | size () const |
bool | empty () const |
bool | contains (const T &) const |
void | insert (iterator, const T &) |
void | erase (iterator) |
T & | front () |
const T & | front () const |
T & | back () |
const T & | back () const |
void | push_front (const T &) |
void | push_back (const T &) |
U32 | push_front_unique (const T &) |
U32 | push_back_unique (const T &) |
S32 | find_next (const T &, U32 start=0) const |
void | pop_front () |
void | pop_back () |
T & | operator[] (U32) |
const T & | operator[] (U32) const |
T & | operator[] (S32 i) |
const T & | operator[] (S32 i) const |
T & | at (U32) |
const T & | at (U32) const |
void | reserve (U32) |
U32 | capacity () const |
Extended interface | |
U32 | memSize () const |
T * | address () const |
U32 | setSize (U32) |
void | increment (U32=1) |
void | increment (const T *array, U32=1) |
void | decrement (U32=1) |
void | insert (U32) |
void | erase (U32) |
void | erase_fast (U32) |
void | erase_fast (iterator) |
void | clear () |
void | compact () |
void | sort (compare_func f) |
T & | first () |
T & | last () |
const T & | first () const |
const T & | last () const |
void | set (void *addr, U32 sz) |
void | merge (const Vector &p) |
A dynamic array class.
The vector grows as you insert or append elements. Insertion is fastest at the end of the array. Resizing of the array can be avoided by pre-allocating space using the reserve() method.
***WARNING***
This template does not initialize, construct or destruct any of it's elements. This means don't use this template for elements (classes) that need these operations. This template is intended to be used for simple structures that have no constructors or destructors.
typedef difference_type(QSORT_CALLBACK * compare_func)(const T *a, const T *b) |
typedef const T* const_iterator |
typedef const T& const_reference |
typedef S32 difference_type |
typedef T* iterator |
typedef T& reference |
typedef U32 size_type |
typedef T value_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Constructs elements from start to end-1
|
inlineprotected |
bool contains | ( | const T & | ) | const |
|
inline |
|
inlineprotected |
Destructs elements from start to end-1
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |