52 proto native external
typename Type();
139 proto
volatile int Call(
Class inst,
string function,
void parm);
222 static proto
int SetVar(out
void var,
string value);
230 static proto
void Watch(
void var,
int flags);
253proto
void Sort(
void param_array[],
int num);
365 proto
void Set(
int n, T value);
427 for (
int i = 0; i < from.Count(); i++ )
429 Insert( from.Get(i) );
468 proto native
void Sort(
bool reverse =
false);
479 int remove_index = Find(value);
481 if ( remove_index >= 0 )
483 RemoveOrdered(remove_index);
489 int remove_index = Find(value);
491 if ( remove_index >= 0 )
499 return ( index > -1 && index <
Count() );
525 Print(
string.Format(
"Array count: %1",
Count()));
526 for (
int i = 0; i <
Count(); i++)
529 Print(
string.Format(
"[%1] => %2", i, item));
563 return Get(GetRandomIndex());
568 T item1 =
Get(item1_index);
569 Set(item1_index,
Get(item2_index));
570 Set(item2_index, item1);
575 for (
int i = 0; i < other.Count(); i++)
577 T item = other.Get(i);
585 int right =
Count() - 1;
591 Set(left++,
Get(right));
613 int new_index = curr_index;
615 if ( move_number > 0 )
617 new_index = curr_index + move_number;
620 if ( move_number < 0 )
622 new_index = curr_index - move_number;
626 if ( new_index <= -count )
628 new_index = (new_index % count);
631 new_index = new_index + count;
635 if ( new_index >= count )
637 new_index = (new_index % count);
646 for (
int i = 0; i <
Count(); i++)
648 SwapItems(i,GetRandomIndex());
666 if (
Count() != pOtherArray.Count())
668 ErrorEx(
"arrays are not the same size");
672 for (
int i = 0; i < pOtherArray.Count(); ++i)
674 if (
Get(i) != pOtherArray.Get(i))
731 proto native
void Swap(set<T> other);
736 int count = other.Count();
737 for (
int i = 0; i < count; i++)
746 int remove_index = Find(value);
747 if (remove_index >= 0)
755 int count = other.Count();
756 for (
int i = 0; i < count; i++)
765 Print(
string.Format(
"Set count: %1",
Count()));
766 for (
int i = 0; i <
Count(); i++)
769 Print(
string.Format(
"[%1] => %2", i, item));
820 proto TValue
Get(TKey key);
831 proto
bool Find(TKey key, out TValue val);
856 proto
void Set(TKey key, TValue value);
880 proto
bool Insert(TKey key, TValue value);
886 for (
int i = 0; i <
Count(); i++)
888 keys.Insert( GetKey( i ) );
896 for (
int i = 0; i <
Count(); i++)
905 if (Contains(old_key))
907 Set(new_key,
Get(old_key));
917 for (
int i = 0; i <
Count(); i++)
931 for (
int i = 0; i <
Count(); i++)
void Remove(Object object)
DisplayElementBase GetElement(eDisplayElements element_id)
enum MagnumStableStateID init
array< ref PlayerStatBase > Get()
Super root of all classes in Enforce script.
Module containing compiled scripts.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void Print(void var)
Prints content of variable to console/log.
proto int ParseString(string input, out string tokens[])
Parses string into array of tokens returns number of tokens.
proto native void Reserve(int newSize)
map< Managed, int > TManagedIntMap
map< Managed, Class > TManagedClassMap
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm)
void SwapItems(int item1_index, int item2_index)
map< typename, float > TTypeNameFloatMap
static proto void Watch(void var, int flags)
Debug tool for watching certain variable. Invokes debugger whenever is variable used.
proto int ParseStringEx(inout string input, string token)
Parses one token from input string. Result is put into token string, and type of token is returned....
void InsertSet(set< T > other)
proto void Sort(void param_array[], int num)
Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
array< typename > TTypenameArray
TKey GetKeyByValue(TValue value)
proto void Remove(TKey key)
array< float > TFloatArray
proto void RemoveElement(int i)
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto void Set(int n, T value)
map< Class, vector > TClassVectorMap
proto int Insert(T value)
proto int Copy(set< T > from)
void RemoveItemUnOrdered(T value)
map< Class, typename > TClassTypenameMap
proto native external bool IsInherited(typename type)
Returns true when instance is of the type, or inherited one.
array< TKey > GetKeyArray()
map< ref Managed, Managed > TManagedRefManagedMap
array< string > TStringArray
static proto Class Cast(Class from)
Try to safely down-cast base class to child class.
proto native void RemoveOrdered(int index)
map< int, Class > TIntClassMap
map< Class, float > TClassFloatMap
map< string, vector > TStringVectorMap
proto native int KillThread(Class owner, string name)
Kills thread.
map< int, string > TIntStringMap
proto native void Swap(notnull array< T > other)
map< int, float > TIntFloatMap
proto owned string ThreadFunction(Class owner, string name, int backtrace, out int linenumber)
Debug function. Returns current function on stack of the thread.
bool IsValidIndex(int index)
proto int Copy(map< TKey, TValue > from)
proto native MapIterator Begin()
array< Managed > TManagedArray
map< ref Managed, vector > TManagedRefVectorMap
proto native void Swap(set< T > other)
int DifferentAtPosition(array< T > pOtherArray)
Returns an index where 2 arrays start to differ from each other.
proto static external StaticType()
Returns typename of object's reference.
map< ref Managed, float > TManagedRefFloatMap
void InsertArray(array< T > other)
array< vector > TVectorArray
array< ref Managed > TManagedRefArray
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
map< ref Managed, ref Managed > TManagedRefManagedRefMap
proto TKey GetIteratorKey(MapIterator it)
proto native MapIterator Next(MapIterator it)
proto int Copy(notnull array< T > from)
map< Class, Class > TClassClassMap
proto native void Sort(bool reverse=false)
proto native MapIterator End()
proto native void Release()
array< Class > TClassArray
map< Class, int > TClassIntMap
proto int InsertAt(T value, int index)
proto void copyarray(void destArray, void srcArray)
static proto int SetVar(out void var, string value)
Sets variable value by value in string.
T GetRandomElement()
Returns a random element of array.
static StaticGetType(typename t)
Returns typename of class even without a variable or instance.
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
map< ref Managed, typename > TManagedRefTypenameMap
map< Managed, typename > TManagedTypenameMap
map< string, int > TStringIntMap
proto volatile void Idle()
set< ref Managed > TManagedRefSet
proto native void Clear()
proto TValue Get(TKey key)
proto TValue GetElement(int index)
map< typename, vector > TTypeNameVectorMap
private static proto bool SafeCastType(Class type, out Class to, Class from)
This function is for internal script usage.
proto native void Resize(int newSize)
map< ref Managed, string > TManagedRefStringMap
map< int, typename > TIntTypenameMap
map< Class, ref Managed > TClassManagedRefMap
map< Managed, Managed > TManagedManagedMap
void RemoveItems(set< T > other)
proto void Set(TKey key, TValue value)
static proto int GetClassVar(Class inst, string varname, int index, out void result)
Dynamic read of variable value by its name.
map< typename, Managed > TTypeNameManagedMap
private void ~ScriptModule()
static proto native ScriptModule LoadScript(ScriptModule parentModule, string scriptFile, bool listing)
Do load script and create ScriptModule for it.
proto void reversearray(void param_array)
map< Managed, ref Managed > TManagedManagedRefMap
map< string, ref Managed > TStringManagedRefMap
map< typename, ref Managed > TTypeNameManagedRefMap
map< typename, int > TTypeNameIntMap
map< string, string > TStringStringMap
map< Class, string > TClassStringMap
map< int, int > TIntIntMap
bool ReplaceKey(TKey old_key, TKey new_key)
map< string, float > TStringFloatMap
map< ref Managed, int > TManagedRefIntMap
proto volatile int Call(Class inst, string function, void parm)
proto native void Remove(int index)
map< typename, Class > TTypeNameClassMap
int MoveIndex(int curr_index, int move_number)
Returns a index in array moved by specific number.
void InsertAll(notnull array< T > from)
Inserts all elements from array.
array< TValue > GetValueArray()
map< string, Class > TStringClassMap
int[] TypeID
script representation for C++ RTTI types
proto native owned external string ClassName()
Returns name of class-type.
set< typename > TTypenameSet
bool GetKeyByValueChecked(TValue value, out TKey key)
map< typename, string > TTypeNameStringMap
map< int, Managed > TIntManagedMap
proto external string ToString()
map< string, typename > TStringTypenameMap
static proto int SetClassVar(Class inst, string varname, int index, void input)
Dynamic write to variable by its name.
proto TValue GetIteratorElement(MapIterator it)
map< Managed, float > TManagedFloatMap
void Debug()
Print all elements in array.
proto bool Insert(TKey key, TValue value)
int GetRandomIndex()
Returns a random index of array. If Count is 0, return index is -1 .
proto bool Find(TKey key, out TValue val)
proto native external Type()
Returns typename of object's class.
proto bool Contains(TKey key)
map< int, vector > TIntVectorMap
set< Managed > TManagedSet
map< int, ref Managed > TIntManagedRefMap
map< typename, typename > TTypeNameTypenameMap
map< ref Managed, Class > TManagedRefClassMap
map< Managed, string > TManagedStringMap
map< Managed, vector > TManagedVectorMap
proto volatile int CallFunctionParams(Class inst, string function, out void returnVal, Class parms)
map< string, Managed > TStringManagedMap
map< Class, Managed > TClassManagedMap
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].