![]() |
ezEngine
Release 25.03
|
A simple task implementation that calls a delegate function. More...
#include <DelegateTask.h>
Public Types | |
using | FunctionType = ezDelegate< void(const T &)> |
Public Member Functions | |
ezDelegateTask (const char *szTaskName, ezTaskNesting taskNesting, FunctionType func, const T ¶m) | |
![]() | |
void | ConfigureTask (const char *szTaskName, ezTaskNesting nestingMode, ezOnTaskFinishedCallback callback=ezOnTaskFinishedCallback()) |
Sets the most important task properties. This has to be done before the task is added to a task group for the first time. More... | |
void | SetMultiplicity (ezUInt32 uiMultiplicity) |
Changes the multiplicity of this task. More... | |
ezUInt32 | GetMultiplicity () const |
bool | IsTaskFinished () const |
Returns whether the task has been finished. This includes being canceled. More... | |
bool | HasBeenCanceled () const |
Can be used inside an overridden 'Execute' function to terminate execution prematurely. | |
![]() | |
virtual | ~ezRefCounted ()=default |
Adds a virtual destructor. | |
![]() | |
ezRefCountingImpl ()=default | |
Constructor. | |
ezRefCountingImpl (const ezRefCountingImpl &rhs) | |
void | operator= (const ezRefCountingImpl &rhs) |
ezInt32 | AddRef () const |
Increments the reference counter. Returns the new reference count. | |
ezInt32 | 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. | |
ezInt32 | GetRefCount () const |
Returns the current reference count. | |
Private Member Functions | |
virtual void | Execute () override |
Override this to implement the task's supposed functionality. More... | |
Additional Inherited Members | |
![]() | |
virtual void | ExecuteWithMultiplicity (ezUInt32 uiInvocation) const |
Override this to implement the task's supposed functionality. More... | |
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 ezTaskSystem.
Reimplemented from ezTask.