G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
TArray Class Reference

Public Member Functions

Functions
void Copy (TArray< T > SourceArray, int SourceIndex, int Count, int TargetIndex=0)
const T & opIndex (int Index) const
TArray< T > & opAssign (TArray< T > Other)
bool opEquals (TArray< T > Other) const
void Add (const T &in Value)
void Append (TArray< T > Other)
void Shuffle ()
void Swap (int FirstIndexToSwap, int SecondIndexToSwap)
 Swap the element at index FirstIndexToSwap with the element at index SecondIndexToSwap.
void AddMultiple (const T &in Value, int Copies)
void MoveAssignFrom (TArray< T > &OtherArray)
 Perform a move-assign from the passed in array into this array. The passed in array will be emptied in the process as its memory is moved over.
bool IsValidIndex (int Index) const
const T & Last (int IndexFromEnd=0) const
T & Last (int IndexFromEnd=0)
void Insert (const T &in Value, int Index=0)
bool AddUnique (const T &in Value)
 Will first do a check if the object already is in the array. Returns 'True' if the object is added.
void Empty (int ReservedSize=0)
void Reset (int ReservedSize=0)
void Reserve (int ReservedSize=0)
void SetNum (int NewNum=0)
T & opIndex (int Index)
void SetNumZeroed (int NewNum=0)
int FindIndex (const T &in Value) const
 Find the first index that contains an element with the given value. If no element matches the value, it will return -1.
bool Contains (const T &in Value) const
int RemoveSingle (const T &in Value)
int Remove (const T &in Value)
int RemoveSingleSwap (const T &in Value)
int RemoveSwap (const T &in Value)
void RemoveAt (int Index)
void RemoveAtSwap (int Index)
void Sort (bool bDescendingOrder=false)
int Num () const
int Max () const
int64 GetAllocatedSize () const
bool IsEmpty () const
int GetSlack () const
void Shrink ()
TArrayIterator< T > Iterator ()
TArrayConstIterator< T > Iterator () const

Public Attributes

Variables
const int Slack
const int64 AllocatedSize

Member Function Documentation

◆ Add()

void Add ( const T &in Value)

◆ AddMultiple()

void AddMultiple ( const T &in Value,
int Copies )

◆ AddUnique()

bool AddUnique ( const T &in Value)

Will first do a check if the object already is in the array. Returns 'True' if the object is added.

◆ Append()

void Append ( TArray< T > Other)

◆ Contains()

bool Contains ( const T &in Value) const

◆ Copy()

void Copy ( TArray< T > SourceArray,
int SourceIndex,
int Count,
int TargetIndex = 0 )

◆ Empty()

void Empty ( int ReservedSize = 0)

◆ FindIndex()

int FindIndex ( const T &in Value) const

Find the first index that contains an element with the given value. If no element matches the value, it will return -1.

◆ GetAllocatedSize()

int64 GetAllocatedSize ( ) const

◆ GetSlack()

int GetSlack ( ) const

◆ Insert()

void Insert ( const T &in Value,
int Index = 0 )

◆ IsEmpty()

bool IsEmpty ( ) const

◆ IsValidIndex()

bool IsValidIndex ( int Index) const

◆ Iterator() [1/2]

TArrayIterator< T > Iterator ( )

◆ Iterator() [2/2]

TArrayConstIterator< T > Iterator ( ) const

◆ Last() [1/2]

T & Last ( int IndexFromEnd = 0)

◆ Last() [2/2]

const T & Last ( int IndexFromEnd = 0) const

◆ Max()

int Max ( ) const

◆ MoveAssignFrom()

void MoveAssignFrom ( TArray< T > & OtherArray)

Perform a move-assign from the passed in array into this array. The passed in array will be emptied in the process as its memory is moved over.

◆ Num()

int Num ( ) const

◆ opAssign()

TArray< T > & opAssign ( TArray< T > Other)

◆ opEquals()

bool opEquals ( TArray< T > Other) const

◆ opIndex() [1/2]

T & opIndex ( int Index)

◆ opIndex() [2/2]

const T & opIndex ( int Index) const

◆ Remove()

int Remove ( const T &in Value)

◆ RemoveAt()

void RemoveAt ( int Index)

◆ RemoveAtSwap()

void RemoveAtSwap ( int Index)

◆ RemoveSingle()

int RemoveSingle ( const T &in Value)

◆ RemoveSingleSwap()

int RemoveSingleSwap ( const T &in Value)

◆ RemoveSwap()

int RemoveSwap ( const T &in Value)

◆ Reserve()

void Reserve ( int ReservedSize = 0)

◆ Reset()

void Reset ( int ReservedSize = 0)

◆ SetNum()

void SetNum ( int NewNum = 0)

◆ SetNumZeroed()

void SetNumZeroed ( int NewNum = 0)

◆ Shrink()

void Shrink ( )

◆ Shuffle()

void Shuffle ( )

◆ Sort()

void Sort ( bool bDescendingOrder = false)

◆ Swap()

void Swap ( int FirstIndexToSwap,
int SecondIndexToSwap )

Swap the element at index FirstIndexToSwap with the element at index SecondIndexToSwap.

Member Data Documentation

◆ AllocatedSize

const int64 AllocatedSize

◆ Slack

const int Slack