wavelength 1.0.0
Loading...
Searching...
No Matches
SerialTasks Class Reference

Task that runs a list of tasks one after another. More...

#include <serialtasks.h>

Inheritance diagram for SerialTasks:
Collaboration diagram for SerialTasks:

Public Member Functions

 ~SerialTasks () override
 Release the list and every task in it.
void Add (Task *pTask)
 Append a task, which the list then manages.
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
 Start the first task, or finish with success when the list is empty.
void OnStop () override
 Stop the task that runs now.
void OnPoll () override
 Poll the task that runs now, start the next one after it is done, and finish after the last one or after a failure.
const std::vector< std::unique_ptr< Task > > & GetTasks () const

Additional Inherited Members

Public Types inherited from Task
enum  State { kStateIdle = 0 , kStateRunning = 1 , kStateDone = 2 , kStateFailed = 3 }
 Values of mState. More...

Detailed Description

Task that runs a list of tasks one after another.

The RTTI includes the class name and records Task as the base. The constructor has no out-of-line copy. It clears the task list and does not set mCurrent.

Constructor & Destructor Documentation

◆ ~SerialTasks()

SerialTasks::~SerialTasks ( )
override

Release the list and every task in it.

Ghidra address:
NTSC-U/C: 0x002a0280
Ghidra address:
PAL: 0x002a9f38

Member Function Documentation

◆ Add()

void SerialTasks::Add ( Task * pTask)

Append a task, which the list then manages.

Parameters
pTaskThe task.
Ghidra address:
NTSC-U/C: 0x002a0340
Ghidra address:
PAL: 0x002a9ff8

◆ OnStart()

void SerialTasks::OnStart ( )
overrideprotectedvirtual

Start the first task, or finish with success when the list is empty.

Ghidra address:
NTSC-U/C: 0x002a04d8
Ghidra address:
PAL: 0x002aa190

Reimplemented from Task.

◆ OnStop()

void SerialTasks::OnStop ( )
overrideprotectedvirtual

Stop the task that runs now.

Ghidra address:
NTSC-U/C: 0x002a0520
Ghidra address:
PAL: 0x002aa1d8

Reimplemented from Task.

◆ OnPoll()

void SerialTasks::OnPoll ( )
overrideprotectedvirtual

Poll the task that runs now, start the next one after it is done, and finish after the last one or after a failure.

Ghidra address:
NTSC-U/C: 0x002a0560
Ghidra address:
PAL: 0x002aa218

Reimplemented from Task.

◆ GetTasks()

const std::vector< std::unique_ptr< Task > > & SerialTasks::GetTasks ( ) const
inlineprotected
Returns
The tasks, in the order they run.

The documentation for this class was generated from the following file: