Public Member Functions | |
Int8Array () | |
The constructor for Int8Array simply calls the Construct function. | |
~Int8Array () | |
The destructor for Int8Array simply calls the Destruct function. | |
void | Construct () |
The Construct function readies the internal structure of the Int8Array for use. | |
void | Destruct () |
The Destruct function cleans up the internal structure of the Int8Array. | |
void | AddInt8 (unsigned __int8 t) |
The AddInt8 function adds a new __int8/char to the Int8Array. | |
unsigned __int8 | ReturnAt (unsigned long i) const |
The ReturnAt function is used to get a __int8/char stored in a specific position within the array. | |
void | AddAt (unsigned long i, unsigned __int8 t) |
The AddAt function replaces an element of the array with a new __int8. | |
void | RemoveAt (unsigned long i) |
The RemoveAt function removes the __int8 at a given position from the Array. | |
unsigned long | NumberOfInt8s () const |
The NumberOfInt8s function returns the number of elements currently in the array. | |
unsigned long | Find (unsigned __int8 v) const |
The Find function returns the index of the first element of a certain __int8 value. | |
Public Attributes | |
unsigned __int8 * | ar |
The internal array data. | |
unsigned long | size |
The number of available elements in the internal array. | |
unsigned long | used |
The number of elements in the internal array that are currently used. |
This class' implementation is nearly identical to LongArray, CThingArray, and PointerArray.
|
The constructor for Int8Array simply calls the Construct function.
|
|
The destructor for Int8Array simply calls the Destruct function.
|
|
The AddAt function replaces an element of the array with a new __int8. If you try to replace an element at a position greater than the number of elements in the array nothing will happen.
|
|
The AddInt8 function adds a new __int8/char to the Int8Array. If there is not enough storage in the internal array it will be expanded. The new __int8 is always added to the end of the array. The size of the array is expanded by 8 every time it needs to be resized.
|
|
The Construct function readies the internal structure of the Int8Array for use. To reset an Int8Array you can call Destruct on it followed by a call to Construct.
|
|
The Destruct function cleans up the internal structure of the Int8Array.
|
|
The Find function returns the index of the first element of a certain __int8 value. The find function searches from the first element to the last element and returns the zero based index when it finds the item. If it cannot be found -1, cast to an unsigned long, is returned.
|
|
The RemoveAt function removes the __int8 at a given position from the Array. The old __int8 is replaced by what was previously the last __int8 in the array and then the active part of the array is reduced by one. The RemoveAt function does not preserve the order of elements. Attempting to remove a position greater than the number of elements in the array has no effect.
|
|
The ReturnAt function is used to get a __int8/char stored in a specific position within the array. If you attempt to return a __int8 at a position greater than the number of elements stored in the array 0 will be the result.
|