Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_SortedArray< Class TValue > Interface Template Reference

Public Member Functions

TValue Get (int n)
 
void Set (int n, TValue value)
 Sets value of element at index [n].
 
void Insert (int order, TValue value)
 Insert new value with given order.
 
void Remove (int i)
 Remove value on given index.
 
void RemoveOrders (int order)
 Remove all entries with given order number.
 
void RemoveValues (TValue value)
 Remove all entries with given value.
 
int GetOrder (int i)
 
TValue GetValue (int i)
 
int Count ()
 
bool IsEmpty ()
 
bool Contains (TValue value)
 
int Find (TValue value)
 Try to find given value in the array.
 
int CopyFrom (notnull SCR_SortedArray< TValue > from)
 Copy data from another sorted array.
 
void Clear ()
 Destroys all elements of the array and sets the Count to 0.
 
int ToArray (out notnull array< TValue > outArray)
 Fills normal array with items in sorted order.
 
void Debug ()
 Print array values to log.
 

Protected Attributes

ref array< int > m_aOrders = {}
 
ref array< TValue > m_aValues = {}
 

Member Function Documentation

◆ Clear()

void SCR_SortedArray< Class TValue >.Clear ( )

Destroys all elements of the array and sets the Count to 0.

◆ Contains()

bool SCR_SortedArray< Class TValue >.Contains ( TValue value)
Returns
true if the array contains given value

◆ CopyFrom()

int SCR_SortedArray< Class TValue >.CopyFrom ( notnull SCR_SortedArray< TValue > from)

Copy data from another sorted array.

Parameters
[in]fromsource array
Returns
number of items in the array

◆ Count()

int SCR_SortedArray< Class TValue >.Count ( )
Returns
number of elements in the array

◆ Debug()

void SCR_SortedArray< Class TValue >.Debug ( )

Print array values to log.

◆ Find()

int SCR_SortedArray< Class TValue >.Find ( TValue value)

Try to find given value in the array.

Parameters
[in]valueSearched value
Returns
index of first occurence, -1 when not found

◆ Get()

TValue SCR_SortedArray< Class TValue >.Get ( int n)
Parameters
[in]nindex
Returns
value at index n

◆ GetOrder()

int SCR_SortedArray< Class TValue >.GetOrder ( int i)
Parameters
[in]ientry index
Returns
order number on given index

◆ GetValue()

TValue SCR_SortedArray< Class TValue >.GetValue ( int i)
Parameters
[in]iindex
Returns
value on given index

◆ Insert()

void SCR_SortedArray< Class TValue >.Insert ( int order,
TValue value )

Insert new value with given order.

Values are ordered from lowest to highest.

Parameters
[in]orderorder in array
[in]valuevalue to be inserted

◆ IsEmpty()

bool SCR_SortedArray< Class TValue >.IsEmpty ( )
Returns
true if the array size is 0, false otherwise

◆ Remove()

void SCR_SortedArray< Class TValue >.Remove ( int i)

Remove value on given index.

Parameters
[in]i

◆ RemoveOrders()

void SCR_SortedArray< Class TValue >.RemoveOrders ( int order)

Remove all entries with given order number.

Parameters
[in]orderorder number to be removed

◆ RemoveValues()

void SCR_SortedArray< Class TValue >.RemoveValues ( TValue value)

Remove all entries with given value.

Parameters
[in]valuevalue to be removed

◆ Set()

void SCR_SortedArray< Class TValue >.Set ( int n,
TValue value )

Sets value of element at index [n].

Parameters
[in]nindex
[in]valuenew value

◆ ToArray()

int SCR_SortedArray< Class TValue >.ToArray ( out notnull array< TValue > outArray)

Fills normal array with items in sorted order.

Parameters
[out]outArraytarget array
Returns
number of items

Member Data Documentation

◆ m_aOrders

ref array<int> SCR_SortedArray< Class TValue >.m_aOrders = {}
protected

◆ m_aValues

ref array<TValue> SCR_SortedArray< Class TValue >.m_aValues = {}
protected

The documentation for this interface was generated from the following file: