![]() |
Plasma Engine
2.0
|
A simple task implementation that calls a delegate function. More...
#include <DelegateTask.h>

Public Types | |
| using | FunctionType = plDelegate<void(const T&)> |
Public Member Functions | |
| plDelegateTask (const char *szTaskName, plTaskNesting taskNesting, FunctionType func, const T ¶m) | |
Public Member Functions inherited from plTask | |
| void | ConfigureTask (const char *szTaskName, plTaskNesting nestingMode, plOnTaskFinishedCallback callback=plOnTaskFinishedCallback()) |
| Sets the most important task properties. This has to be done before the task is added to a task group for the first time. | |
| void | SetMultiplicity (plUInt32 uiMultiplicity) |
| Changes the multiplicity of this task. | |
| plUInt32 | GetMultiplicity () const |
| bool | IsTaskFinished () const |
| Returns whether the task has been finished. This includes being canceled. | |
| bool | HasBeenCanceled () const |
| Can be used inside an overridden 'Execute' function to terminate execution prematurely. | |
Public Member Functions inherited from plRefCounted | |
| virtual | ~plRefCounted ()=default |
| Adds a virtual destructor. | |
Public Member Functions inherited from plRefCountingImpl | |
| plRefCountingImpl ()=default | |
| Constructor. | |
| plRefCountingImpl (const plRefCountingImpl &rhs) | |
| void | operator= (const plRefCountingImpl &rhs) |
| plInt32 | AddRef () const |
| Increments the reference counter. Returns the new reference count. | |
| plInt32 | ReleaseRef () const |
| Decrements the reference counter. Returns the new reference count. | |
| bool | IsReferenced () const |
| Returns true if the reference count is greater than 0, false otherwise. | |
| plInt32 | GetRefCount () const |
| Returns the current reference count. | |
Private Member Functions | |
| virtual void | Execute () override |
| Override this to implement the task's supposed functionality. | |
Additional Inherited Members | |
Protected Member Functions inherited from plTask | |
| virtual void | ExecuteWithMultiplicity (plUInt32 uiInvocation) const |
| Override this to implement the task's supposed functionality. | |
A simple task implementation that calls a delegate function.
|
inlineoverrideprivatevirtual |
Override this to implement the task's supposed functionality.
This function is called for tasks that do not use multiplicity. They are executed a single time for each time they are added to the plTaskSystem.
Reimplemented from plTask.