PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
array< ref CallQueueContext > Class Reference

CallQueue Class provide "lazy" calls - when we don't want to execute function immediately but later during frame update (used mainly in UI)
usage: More...

Private Member Functions

void CallQueue ()
 
void Tick ()
 System function, don't call it.
 
void Call (Class obj, string fn_name, Param params=NULL)
 Creates new call request, add it on queue and execute during frame update (depends on call category)
 
void RemoveCalls (Class obj)
 Removes all queued calls for object (call this function when object is going to be deleted)
 

Private Attributes

private bool m_processing
 

Detailed Description

CallQueue Class provide "lazy" calls - when we don't want to execute function immediately but later during frame update (used mainly in UI)
usage:

GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Refresh"); // calls "Refresh" function on "this" with no arguments
GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Show", new Param1<bool>(true)); // calls "Show" function on "this" with one bool argument
GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(this, "SetPos", new Param2<float, float>(0.2, 0.5)); // calls "SetPos" function on "this" with two float arguments
override ScriptCallQueue GetCallQueue(int call_category)
Definition DayZGame.c:1187
Definition PPEConstants.c:68
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native CGame GetGame()
const int CALL_CATEGORY_GUI
Definition tools.c:9

Member Function Documentation

◆ Call()

void Call ( Class  obj,
string  fn_name,
Param  params = NULL 
)
inlineprivate

Creates new call request, add it on queue and execute during frame update (depends on call category)

Parameters
objtarget object on which function will be executed
fn_namename of function (on object "obj") which will be executed
paramsfunction arguments see Param for usage, default NULL (no arguments)
Warning
When object "obj" is deleted prior call execution, don't forget to remove calls for this object with RemoveCalls

◆ CallQueue()

void CallQueue ( )
inlineprivate

◆ RemoveCalls()

void RemoveCalls ( Class  obj)
inlineprivate

Removes all queued calls for object (call this function when object is going to be deleted)

Parameters
objobject for which you want remove all "lazy" calls

References Count, Get(), CallQueueContext::Invalidate(), and CallQueueContext::m_target.

◆ Tick()

void Tick ( )
inlineprivate

System function, don't call it.

References CallQueueContext::Call(), Count, Get(), CallQueueContext::IsValid(), and Remove().

Field Documentation

◆ m_processing

private bool m_processing
private

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