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

Memory card work made of MemcardTask steps that run one after another. More...

#include <memcardserialtask.h>

Inheritance diagram for MemcardSerialTask:
Collaboration diagram for MemcardSerialTask:

Public Member Functions

 ~MemcardSerialTask () override=default
 Destroy the object.
int GetResult ()
 Report the outcome of the work.
virtual void OnDirListed ()
 Learn that a directory listing step ended.
virtual void OnCardInfo ()
 Learn that a card information step ended.
virtual void OnFileLoaded ()
 Learn that a file load step ended.
Public Member Functions inherited from SerialTasks
 ~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 OnStop () override
 Record MemcardTask::sStatus in mResult.
Protected Member Functions inherited from SerialTasks
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

Memory card work made of MemcardTask steps that run one after another.

The RTTI records the class as deriving from SerialTasks. The object is 0x20 bytes. When the work ends, OnStop() records MemcardTask::sStatus as the result GetResult() reports. The three notification methods, four in the PAL build, do nothing here. A step calls one of them on the task it was given, and a subclass overrides the one it needs to check the step's outcome.

Constructor & Destructor Documentation

◆ ~MemcardSerialTask()

MemcardSerialTask::~MemcardSerialTask ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x00351508
Ghidra address:
PAL: 0x003be780

Member Function Documentation

◆ GetResult()

int MemcardSerialTask::GetResult ( )

Report the outcome of the work.

Returns
One of MemcardTask::Status.
Ghidra address:
NTSC-U/C: 0x0015e130
Ghidra address:
PAL: 0x0015f970

◆ OnDirListed()

virtual void MemcardSerialTask::OnDirListed ( )
inlinevirtual

Learn that a directory listing step ended.

Ghidra address:
NTSC-U/C: 0x00351530
Ghidra address:
PAL: 0x003be7a8

Reimplemented in MCCheckRemixSpaceNeededTask, MCCheckSaveSpaceNeededTask, and MCInitialCheckTask.

◆ OnCardInfo()

virtual void MemcardSerialTask::OnCardInfo ( )
inlinevirtual

Learn that a card information step ended.

Ghidra address:
NTSC-U/C: 0x00351538
Ghidra address:
PAL: 0x003be7b0

Reimplemented in MCFormatCardTask, and MCListNetConfigsTask.

◆ OnFileLoaded()

virtual void MemcardSerialTask::OnFileLoaded ( )
inlinevirtual

Learn that a file load step ended.

Ghidra address:
NTSC-U/C: 0x00351540
Ghidra address:
PAL: 0x003be7b8

Reimplemented in MCLoadSettingsTask.

◆ OnStop()

void MemcardSerialTask::OnStop ( )
overrideprotectedvirtual

Record MemcardTask::sStatus in mResult.

Ghidra address:
NTSC-U/C: 0x0015e120
Ghidra address:
PAL: 0x0015f960

Reimplemented from Task.


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