|
wavelength 1.0.0
|
Task that runs one script command. More...
#include <scripttask.h>


Public Member Functions | |
| ~ScriptTask () override=default | |
| Destroy the object. | |
| ScriptTask (DataArray *pCommand) | |
| Construct a task that runs a command. | |
| Public Member Functions inherited from Task | |
| Task () | |
| Construct an idle task. | |
| virtual | ~Task () |
| Release the task. | |
| int | Poll () |
| Report the state after giving a running task one poll. | |
| void | Start () |
| Enter the running state and call OnStart(), unless the task is already running. | |
| void | Stop () |
| Call OnStop() when the task is running, and return to the idle state. | |
| void | Finish (bool bSucceeded) |
| End the task from outside its poll, and call OnStop() when it was running. | |
| int | GetState () const |
| Report mState. | |
Protected Member Functions | |
| void | OnStart () override |
| Run the command and finish the task. | |
| Protected Member Functions inherited from Task | |
| virtual void | OnStop () |
| Abandon the work. | |
| virtual void | OnPoll () |
| Advance the work, and set mState to kStateDone when it finishes. | |
Additional Inherited Members | |
| Public Types inherited from Task | |
| enum | State { kStateIdle = 0 , kStateRunning = 1 , kStateDone = 2 , kStateFailed = 3 } |
| Values of mState. More... | |
Task that runs one script command.
The RTTI includes the class name and records Task as the base. The task is done as soon as it starts.
|
overridedefault |
Destroy the object.
|
explicit |
Construct a task that runs a command.
| pCommand | The command. |
|
overrideprotectedvirtual |
Run the command and finish the task.
Reimplemented from Task.