TArray is a PowerPlant template class that is a template wrapper for LArray.
Methods :
The methods in this class are:
Data Members:
There are no data members in this class.
Operation:
You can't store actual objects in a TArray or LArray. Only use TArray and LArray to store pointers to objects (created via new), built-in numerical data types, or data structures (simple structs).
Source files:
Ancestors:
See Also:
Purpose:
Access:
Prototype:
TArray( LComparator *inComparator = nil,
Boolean inKeepSorted = false );
TArray( UInt32 inItemCount,
LComparator *inComparator = nil,
Boolean inKeepSorted = false );
TArray( Handle inItemsHandle,Parameters:
LComparator *inComparator = nil,
Boolean inIsSorted = false,
Boolean inKeepSorted = false );
The parameters for these constructors are:
Purpose:
The destructor destroys the array.
Access:
Prototype:
virtual ~TArray();
Purpose:
This adds an item to the array. This is an override of AddItem() in LArray.
Purpose:
Assign the same value to items in the array starting at the specified index. This is an override of AssignItemsAt() in LArray.
Purpose:
Returns the index of the specified item within the array. This is an override of FetchIndexOf() in LArray.
Purpose:
Return the index at which the specified item would be inserted. This is an override of FetchInsertIndexOf() in LArray.
Purpose:
Pass back the item at the specified index. This is an override of FetchItemAt() in LArray.
Purpose:
Access:
Prototype:
T* FetchItemPtr( ArrayIndexT inAtIndex ) const;Parameters:
The parameter for this method is:
Return:
A pointer to the array item at the specified index.
Purpose:
Insert items at the specified position in an array. This is an override of InsertItemsAt() in LArray.
Purpose:
Remove an item from an array. This is an override of Remove() in LArray.
Purpose:
The array operator is overloaded for this class to provide convenient array-like access to array items, even though they are implemented differently than the row/column arrangement in memory.
Access:
Prototype:
T& operator [] ( ArrayIndexT inAtIndex );
const T& operator [] (ArrayIndexT inAtIndex) const;Parameters:
The parameter for this method is:
Return:
A reference to the array element/item of interest.