#include <Array.h>
Public Member Functions | |
Array () | |
Array (const Array< T > &in) | |
virtual | ~Array () |
uint32 | getLength () const |
uint32 | getSize () const |
void | reserve (uint32 number) |
void | free () |
void | clear () |
void | add (const T elem) |
void | remove (int32 i) |
void | remove (int32 i, int32 n) |
const T & | operator[] (int32 i) const |
T & | operator[] (int32 i) |
void | operator= (const Array< T > &in) |
void | operator+= (Array< T > &in) |
const char * | toString () |
lang::Array< T >::Array | ( | ) | [inline] |
Constructor
lang::Array< T >::Array | ( | const Array< T > & | in | ) | [inline] |
Copy Constructor
in | The array reference |
lang::Array< T >::~Array | ( | ) | [inline, virtual] |
Destructor
uint32 lang::Array< T >::getLength | ( | ) | const [inline] |
Get the length
uint32 lang::Array< T >::getSize | ( | ) | const [inline] |
Get the size in bytes
void lang::Array< T >::reserve | ( | uint32 | number | ) | [inline] |
Reserve the required amount of space for the array
n | The desired size of memory |
void lang::Array< T >::free | ( | ) | [inline] |
Free all the space
void lang::Array< T >::clear | ( | ) | [inline] |
Clear the whole array, but keep the memory space
void lang::Array< T >::add | ( | const T | elem | ) | [inline] |
Add a new element to the end of the array, automatically allocating more space, if needed
elem | The item to be inserted |
void lang::Array< T >::remove | ( | int32 | i | ) | [inline] |
Remove the element in the given position
i | The index |
void lang::Array< T >::remove | ( | int32 | i, | |
int32 | n | |||
) | [inline] |
Remove 'n' elements in the given position
i | The index | |
n | The number |
const T & lang::Array< T >::operator[] | ( | int32 | i | ) | const [inline] |
Indexing operator returning const
i | The index |
T & lang::Array< T >::operator[] | ( | int32 | i | ) | [inline] |
Indexing operator
i | The index |
void lang::Array< T >::operator= | ( | const Array< T > & | in | ) | [inline] |
Copy Constructor
in | The object reference |
void lang::Array< T >::operator+= | ( | Array< T > & | in | ) | [inline] |
Adds another array to the end of current array
in | The object reference |
const char * lang::Array< T >::toString | ( | ) | [inline] |