Base class of all task types. More...
#include <PxTask.h>
Public Member Functions | |
PxBaseTask () | |
virtual | ~PxBaseTask () |
virtual void | run ()=0 |
The user-implemented run method where the task's work should be performed. More... | |
virtual const char * | getName () const =0 |
Return a user-provided task name for profiling purposes. More... | |
virtual void | addReference ()=0 |
Implemented by derived implementation classes. More... | |
virtual void | removeReference ()=0 |
Implemented by derived implementation classes. More... | |
virtual PxI32 | getReference () const =0 |
Implemented by derived implementation classes. More... | |
virtual void | release ()=0 |
Implemented by derived implementation classes. More... | |
PX_INLINE void | runProfiled (PxU32 threadId=0) |
Execute user run method with wrapping profiling events. More... | |
PX_INLINE void | setProfileStat (PxU16 stat) |
Specify stop event statistic. More... | |
PX_INLINE PxTaskManager * | getTaskManager () const |
Return PxTaskManager to which this task was submitted. More... | |
Protected Attributes | |
PxU16 | mEventID |
Registered profile event ID. More... | |
PxU16 | mProfileStat |
Profiling statistic. More... | |
PxTaskManager * | mTm |
Owning PxTaskManager instance. More... | |
Friends | |
class | PxTaskMgr |
Base class of all task types.
PxBaseTask defines a runnable reference counted task with built-in profiling.
|
inline |
|
inlinevirtual |
|
pure virtual |
Implemented by derived implementation classes.
Implemented in PxLightCpuTask, and PxTask.
Referenced by PxLightCpuTask::setContinuation().
|
pure virtual |
Return a user-provided task name for profiling purposes.
It does not have to be unique, but unique names are helpful.
|
pure virtual |
Implemented by derived implementation classes.
Implemented in PxLightCpuTask, and PxTask.
|
inline |
Return PxTaskManager to which this task was submitted.
Note, can return NULL if task was not submitted, or has been completed.
|
pure virtual |
Implemented by derived implementation classes.
A task may assume in its release() method that the task system no longer holds references to it - so it may safely run its destructor, recycle itself, etc. provided no additional user references to the task exist
Implemented in PxLightCpuTask, PxTask, and PxGpuTask.
|
pure virtual |
Implemented by derived implementation classes.
Implemented in PxLightCpuTask, PxTask, and PxSpuTask.
Referenced by PxGpuTask::release().
|
pure virtual |
Execute user run method with wrapping profiling events.
Optional entry point for use by CpuDispatchers.
[in] | threadId | The threadId of the thread that executed the task. |
Specify stop event statistic.
If called before or while the task is executing, the given value will appear in the task's event bar in the profile viewer
[in] | stat | The stat to signal when the task is finished |
|
friend |
|
protected |
Registered profile event ID.
|
protected |
Profiling statistic.
|
protected |
Owning PxTaskManager instance.