Public Member Functions | |
void | insertAt (uint index, const T &in value) |
Inserts a new element into the array at the specified index. | |
void | insertAt (uint index, const T[]&inout arr) |
Inserts another array of elements into the array at the specified index. | |
void | insertLast (const T &in value) |
Appends an element at the end of the array. | |
void | removeAt (uint index) |
Removes the element at the specified index. | |
void | removeLast () |
Removes the last element of the array. | |
void | removeRange (uint start, uint count) |
Removes count elements starting from start. | |
uint | length () const |
Returns the length of the array. | |
void | reserve (uint length) |
void | resize (uint length) |
Sets the new length of the array. | |
void | sortAsc () |
Sorts the elements in the array in ascending order. For object types, this will use the type's opCmp method. | |
void | sortAsc (uint startAt, uint count) |
Sorts only the elements starting at index startAt and the following count elements in the array in ascending order. For object types, this will use the type's opCmp method. | |
void | sortDesc () |
Sorts the elements in the array in descending order. For object types, this will use the type's opCmp method. | |
void | sortDesc (uint startAt, uint count) |
Sorts only the elements starting at index startAt and the following count elements in the array in descending order. For object types, this will use the type's opCmp method. | |
void | reverse () |
Reverses the order of the elements in the array. | |
int | find (const T &in value) const |
Returns the index of the first element that has the same value as the wanted value. For object types, this will use the type's opEquals or opCmp method to compare the value. For arrays of handles any null handle will be skipped. If no match is found will return a negative value. | |
int | find (uint startAt, const T &in value) const |
Returns the index of the first element that has the same value as the wanted value. For object types, this will use the type's opEquals or opCmp method to compare the value. For arrays of handles any null handle will be skipped. If no match is found will return a negative value. | |
int | findByRef (const T &in value) const |
Searches for a matching address. These are especially useful for arrays of handles where specific instances of objects are desired, and not just objects that happen to have equal value. If no match is found will return a negative value. | |
int | findByRef (uint startAt, const T &in value) const |
Searches for a matching address. These are especially useful for arrays of handles where specific instances of objects are desired, and not just objects that happen to have equal value. If no match is found will return a negative value. | |
bool | isEmpty () const |
T & | opIndex (uint index) |
const T & | opIndex (uint index) const |
T &[] | opAssign (const T[]&in) |
bool | opEquals (const T[]&in) const |
funcdef bool | less (const ?&in a, const ?&in b) |
sorting function for sort | |
void | sort (less &in, uint startAt=0, uint count=uint(- 1)) |
sorts array using the passed in less function | |
Definition at line 540 of file t1_scriptAPI.cpp.
int array< T >::find | ( | const T &in | value | ) | const |
Returns the index of the first element that has the same value as the wanted value. For object types, this will use the type's opEquals or opCmp method to compare the value. For arrays of handles any null handle will be skipped. If no match is found will return a negative value.
int array< T >::find | ( | uint | startAt, |
const T &in | value ) const |
Returns the index of the first element that has the same value as the wanted value. For object types, this will use the type's opEquals or opCmp method to compare the value. For arrays of handles any null handle will be skipped. If no match is found will return a negative value.
int array< T >::findByRef | ( | const T &in | value | ) | const |
Searches for a matching address. These are especially useful for arrays of handles where specific instances of objects are desired, and not just objects that happen to have equal value. If no match is found will return a negative value.
int array< T >::findByRef | ( | uint | startAt, |
const T &in | value ) const |
Searches for a matching address. These are especially useful for arrays of handles where specific instances of objects are desired, and not just objects that happen to have equal value. If no match is found will return a negative value.
void array< T >::insertAt | ( | uint | index, |
const T &in | value ) |
Inserts a new element into the array at the specified index.
void array< T >::insertAt | ( | uint | index, |
const T &[]inout | arr ) |
Inserts another array of elements into the array at the specified index.
void array< T >::insertLast | ( | const T &in | value | ) |
Appends an element at the end of the array.
bool array< T >::isEmpty | ( | ) | const |
uint array< T >::length | ( | ) | const |
Returns the length of the array.
funcdef bool array< T >::less | ( | const ?&in | a, |
const ?&in | b ) |
sorting function for sort
T &[] array< T >::opAssign | ( | const T &[] | in | ) |
bool array< T >::opEquals | ( | const T &[] | in | ) | const |
T & array< T >::opIndex | ( | uint | index | ) |
const T & array< T >::opIndex | ( | uint | index | ) | const |
void array< T >::removeAt | ( | uint | index | ) |
Removes the element at the specified index.
void array< T >::removeLast | ( | ) |
Removes the last element of the array.
void array< T >::removeRange | ( | uint | start, |
uint | count ) |
Removes count elements starting from start.
void array< T >::reserve | ( | uint | length | ) |
void array< T >::resize | ( | uint | length | ) |
Sets the new length of the array.
void array< T >::reverse | ( | ) |
Reverses the order of the elements in the array.
sorts array using the passed in less function
void array< T >::sortAsc | ( | ) |
Sorts the elements in the array in ascending order. For object types, this will use the type's opCmp method.
void array< T >::sortAsc | ( | uint | startAt, |
uint | count ) |
Sorts only the elements starting at index startAt and the following count elements in the array in ascending order. For object types, this will use the type's opCmp method.
void array< T >::sortDesc | ( | ) |
Sorts the elements in the array in descending order. For object types, this will use the type's opCmp method.
void array< T >::sortDesc | ( | uint | startAt, |
uint | count ) |
Sorts only the elements starting at index startAt and the following count elements in the array in descending order. For object types, this will use the type's opCmp method.