Arma Reforger Script API
Loading...
Searching...
No Matches
PersistenceResultCallback Interface Reference
Inheritance diagram for PersistenceResultCallback:
PersistenceCallback

Public Member Functions

proto void PersistenceResultCallback (PersistenceResultDelegate delegate=null, Managed context=null)
 Callbacks can be inherited to implement OnResult or constructed by passing a function to handle it with the same parameters.
 
proto external bool InvokeDelegate (EPersistenceStatusCode statusCode, Managed result, bool isLast, Managed context=null)
 Invoke the delegate assigned to this callback. Returns false if there is none. To be used from OnResult.
 

Protected Member Functions

void OnResult (EPersistenceStatusCode statusCode, Managed result, bool isLast, Managed context=null)
 Will use the delegate passed to constructor if not implemented.
 

Constructor & Destructor Documentation

◆ PersistenceResultCallback()

proto void PersistenceResultCallback.PersistenceResultCallback ( PersistenceResultDelegate delegate = null,
Managed context = null )

Callbacks can be inherited to implement OnResult or constructed by passing a function to handle it with the same parameters.

Member Function Documentation

◆ InvokeDelegate()

proto external bool PersistenceResultCallback.InvokeDelegate ( EPersistenceStatusCode statusCode,
Managed result,
bool isLast,
Managed context = null )

Invoke the delegate assigned to this callback. Returns false if there is none. To be used from OnResult.

◆ OnResult()

void PersistenceResultCallback.OnResult ( EPersistenceStatusCode statusCode,
Managed result,
bool isLast,
Managed context = null )
protected

Will use the delegate passed to constructor if not implemented.

Parameters
statusCodeThe result status. OK as expected result, anything else needs handling / logging / throwing errors.
resultThe result instance which must be casted into your expected type. Usually IEntity or custom script class. Special case: If a specific id should have been fetched, but the status code is not OK, the result is the persistence id it failed to fetch.
isLastIf the load request resulted in multiple instance the callback wil be invoked as many times with the last invoke being isLast=true. You can store all results in a member array and pass them somewhere else after recieving the last one.
contextThe optional context instance passed to constructor.

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