Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SCR_SortedArray< Class TValue > Interface Template Reference
Inheritance diagram for SCR_SortedArray< Class TValue >:
[legend]

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 = new array<int>()
 
ref array< TValue > m_aValues = new array<TValue>()
 

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
fromSource array
Returns
Number of items in 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
valueSearched value
Returns
Index of first occurance, -1 when not found

◆ Get()

TValue SCR_SortedArray< Class TValue >.Get ( int  n)
Returns
Value at index [n]
Parameters
nIndex
Returns
Value

◆ GetOrder()

int SCR_SortedArray< Class TValue >.GetOrder ( int  i)
Parameters
Index
Returns
Order number on given index

◆ GetValue()

TValue SCR_SortedArray< Class TValue >.GetValue ( int  i)
Parameters
Index
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
orderOrder in array
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
Index

◆ RemoveOrders()

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

Remove all entries with given order number.

Parameters
orderOrder number to be removed

◆ RemoveValues()

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

Remove all entries with given value.

Parameters
valueValue to be removed

◆ Set()

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

Sets value of element at index [n].

Parameters
nIndex
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 = new array<int>()
protected

◆ m_aValues

ref array<TValue> SCR_SortedArray< Class TValue >.m_aValues = new array<TValue>()
protected

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