GTAdhocAPI
Gran Turismo (6) Adhoc API Documentation
|
Stores a collection of items. More...
Public Member Functions | |
Array () | |
constructor taking no param More... | |
Array (Int size) | |
Creates an array with the specified size. More... | |
Int | resize (Int size) |
Same effect as size. More... | |
void | reserve () |
Obsolete? More... | |
void | unshift (Object obj) |
Adds one element to the beginning of the array. More... | |
void | shift () |
Removes one element from the beginning of the array. More... | |
ByteData | pack (String fmt) |
Binary packs the array. More... | |
void | push (Object obj) |
Pushes an element to the end of the array. More... | |
Object | pop () |
Pops (removes) an element from the beginning of the array. More... | |
String | join (String separator) |
Joins the array elements into one string with the provided separator. More... | |
void | concat (Object obj) |
Concatenates (adds) an element to the array. More... | |
void | append (Object obj) |
Appends (adds) an element to the array. More... | |
Int | bsearch (Object obj) |
Binary searches the array for an array element and returns the index of the element if found. More... | |
void | move (Int index_src, Int index_target) |
Moves (swaps) an element from an array index to another. NOTE: Out of range can crash the engine. More... | |
void | sort () |
Sorts an array in-place using the default comparer. More... | |
void | sort (Function< Object, Object > comparer) |
Sorts an array in-place using the provided comparer. More... | |
void | erase (Int index) |
Erases an element from the array by index. No error will be returned if out of range. More... | |
Int | indexOf (Object obj) |
Gets the index of an element. More... | |
Int | indexOf (Object obj, Int start_index) |
Gets the index of an element starting from array position. More... | |
Int | indexOf (Object obj, Int start_index, Int count) |
Gets the index of an element starting from array position and count of elements starting from it. More... | |
void | rotate (Int shift_count) |
Shifts all the elements backwards (wraps at end of array) by the specified count. More... | |
Array | reverse () |
Reverses the array elements. More... | |
void | randomShuffle () |
Randomly shuffles the array. More... | |
void | randomShuffle (UInt seed) |
Shuffles the array using the provided seed (normally a seed from MRandom). More... | |
void | clear () |
Clears the array. More... | |
Bool | empty () |
Returns whether the array is empty. More... | |
operator+ () | |
Appends an element (or elements from a source array). More... | |
void | each (FunctionObject< Object > cb) |
Performs a callback on each element. More... | |
Array | map (FunctionObject< Object > cb) |
Creates a new array populated with the results of calling a provided function on every element in the calling array. More... | |
Public Member Functions inherited from System::Object | |
Object () | |
constructor taking no param More... | |
Bool | isInstanceOf (Class classType) |
Returns whether an object is of a specific class/type. More... | |
Object | getDeepCopy () |
Gets a deep copy of this object. More... | |
void | setDeepCopy (Object obj) |
Unk. More... | |
String | dump () |
Dumps all info about an object. More... | |
Object | getObjectAttribute (string path) |
void | setObjectAttribute (string path, Object value) |
Bool | hasPrimitiveInterface () |
Returns whether this object has a primitive interface. More... | |
Bool | toBool () |
Casts this object to Bool. More... | |
Byte | toByte () |
Casts this object to Byte. More... | |
Short | toShort () |
Casts this object to Short. More... | |
Int | toInt () |
Casts this object to Int. More... | |
Long | toLong () |
Casts this object to Long. More... | |
UByte | toUByte () |
Casts this object to UByte. More... | |
UShort | toUShort () |
Casts this object to UShort. More... | |
UInt | toUInt () |
Casts this object to UInt. More... | |
ULong | toULong () |
Casts this object to ULong. More... | |
Float | toFloat () |
Casts this object to Float. More... | |
Double | toDouble () |
Casts this object to Double. More... | |
String | toString () |
Casts this object to String. More... | |
Symbol | toSymbol () |
Casts this object to Symbol. More... | |
Bool | hasArrayInterface () |
Returns whether this object has an Array interface. More... | |
Int | getArrayCount () |
Gets the Array item count for this object. More... | |
void | setArrayCount () |
Sets the Array item count for this object. More... | |
Object | getArrayElement (Object arg0) |
Gets an Array item for this object. More... | |
void | setArrayElement (Object arg0, Object arg1) |
Sets the Array item for this object. More... | |
Bool | hasMapInterface () |
Returns whether this object has a Map interface. More... | |
int | getMapCount () |
Returns the count of items in the map. More... | |
void | setMapElement (Object arg0, Object arg1) |
Returns whether the Map has a specific object key. Bool hasMapElement(Object arg0);. More... | |
Object | getMapElement (Object arg0) |
Gets a Map element by key. More... | |
void | hasGeneratorInterface () |
Returns whether this object has a generator interface. More... | |
Iterator | generator () |
Returns generator (?) More... | |
void | hasIteratorInterface () |
Returns whether this object has an iterator. More... | |
Iterator | iterator () |
Gets the iterator for this object. More... | |
void | hasVariableInterface () |
Returns whether this object is a variable. More... | |
void | hasFunctionInterface () |
Returns whether this object has a function interface. More... | |
Object | call () |
Calls this object as a function. More... | |
Bool | hasByteDataInterface () |
Returns whether this object has a byte data interface. More... | |
Int | getByteDataCount () |
Returns the ByteData size for this object. More... | |
void | setByteDataCount (Int count) |
Sets the ByteData size for this object. More... | |
Int | getByteDataCapacity () |
Returns the ByteData capacity for this object. More... | |
void | setByteDataCapacity (Int capacity) |
Sets the ByteData capacity for this object. More... | |
ByteData | getByteData () |
Gets the underlaying ByteData. More... | |
void | setByteData (ByteData bytedata) |
Sets the underlaying ByteData. More... | |
void | hasObjectSelectorInterface () |
Returns whether this object has an object selector interface. More... | |
void | self () |
Gets the get for this object if it has a get interface. More... | |
void | getArchiveTree () |
void | setArchiveTree () |
ByteData | serialize () |
Serializes this object. More... | |
void | deserialize (ByteData serializedData) |
Deserializes this object. More... | |
void | defined (Object obj) |
Returns whether a certain object is defined within this object. More... | |
Array | find_all (FunctionObject func) |
Finds all the elements in this object that matches the predicates. More... | |
void | each_all (FunctionObject func) |
Applies callback to all elements in this object. More... | |
Array | map_all (FunctionObject< Object > func) |
Maps all the elements in this object. More... | |
Bool | operator!= () |
Returns whether this object is not equal to another. More... | |
Bool | operator== () |
Returns whether this object is equal to another. More... | |
Public Attributes | |
Int | size |
Gets or sets the array size. More... | |
Iterator | iterator_with_index |
Returns an iterator returning [index, element]. More... | |
Public Attributes inherited from System::Object | |
Int | rc_size |
Getter-only. Reference counter size of this object. More... | |
Object | rc_class |
Getter-only. Type name of the object. More... | |
Int | rc_count |
Getter-only. Reference count of this object. More... | |
Int | weak_count |
Getter-only. Weak reference count of this object. More... | |
Class | class_id |
Class (type) object for this object. More... | |
|
inline |
void System::Array::append | ( | Object | obj | ) |
Appends (adds) an element to the array.
Binary searches the array for an array element and returns the index of the element if found.
void System::Array::clear | ( | ) |
Clears the array.
void System::Array::concat | ( | Object | obj | ) |
Concatenates (adds) an element to the array.
void System::Array::each | ( | FunctionObject< Object > | cb | ) |
Performs a callback on each element.
Bool System::Array::empty | ( | ) |
Returns whether the array is empty.
void System::Array::erase | ( | Int | index | ) |
Erases an element from the array by index. No error will be returned if out of range.
Gets the index of an element.
Gets the index of an element starting from array position.
Gets the index of an element starting from array position and count of elements starting from it.
Joins the array elements into one string with the provided separator.
Array System::Array::map | ( | FunctionObject< Object > | cb | ) |
Creates a new array populated with the results of calling a provided function on every element in the calling array.
Moves (swaps) an element from an array index to another. NOTE: Out of range can crash the engine.
|
inline |
Object System::Array::pop | ( | ) |
Pops (removes) an element from the beginning of the array.
void System::Array::push | ( | Object | obj | ) |
Pushes an element to the end of the array.
void System::Array::randomShuffle | ( | ) |
Randomly shuffles the array.
void System::Array::randomShuffle | ( | UInt | seed | ) |
Shuffles the array using the provided seed (normally a seed from MRandom).
void System::Array::reserve | ( | ) |
Obsolete?
Array System::Array::reverse | ( | ) |
Reverses the array elements.
void System::Array::rotate | ( | Int | shift_count | ) |
Shifts all the elements backwards (wraps at end of array) by the specified count.
void System::Array::shift | ( | ) |
Removes one element from the beginning of the array.
void System::Array::sort | ( | ) |
Sorts an array in-place using the default comparer.
Sorts an array in-place using the provided comparer.
Example code for sorting strings backwards
void System::Array::unshift | ( | Object | obj | ) |
Adds one element to the beginning of the array.
Iterator System::Array::iterator_with_index |