C4 Engine Terathon Software C4 Engine API Documentation

• Utility Library

API Links
Developer Links

Completable::SetCompletionProc

Defined in:  C4Completable.h
Sets the completion procedure for an object.
Prototype

void SetCompletionProc(CompletionProc *proc);

void SetCompletionProc(CompletionProc *proc, dataType data);

Parameters
proc A pointer to the completion procedure. The function passed will be invoked whenever Completable::CallCompletionProc is called (usually from a subclass). The proc parameter may be nullptr, in which case the object has no completion procedure and calls to Completable::CallCompletionProc have no effect.
data This value will be passed to the completion procedure as its second parameter.
Description
The SetCompletionProc function sets the completion procedure for an object that inherits from the Completable class template. The CompletionProc type is defined as

typedef void CompletionProc(classType *, dataType);

where classType and dataType are the template parameters for the Completable class template. When a subclass completes a task and wishes to notify the user of the object that the task has completed, it calls Completable::CallCompletionProc.
See Also

Completable::GetCompletionProc

Completable::GetCompletionData

Completable::SetCompletionData

Completable::CallCompletionProc