Work that reads a file into a block of memory: open, read, and close.
More...
#include <mcloadfiletask.h>
|
| | ~MCLoadFileTask () override=default |
| | Destroy the object.
|
| | MCLoadFileTask () |
| | Construct the steps.
|
| void | Set (MemcardSerialTask *pOwner, int nPort, const char *pszName, void *pBuffer, int nSize) |
| | Prepare the work.
|
| | ~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.
|
| | ~SerialTasks () override |
| | Release the list and every task in it.
|
| void | Add (Task *pTask) |
| | Append a task, which the list then manages.
|
| | 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.
|
|
| void | OnStop () override |
| | Tell mOwner that the work ended.
|
| void | OnStop () override |
| | Record MemcardTask::sStatus in mResult.
|
| 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 |
Work that reads a file into a block of memory: open, read, and close.
The RTTI records the class as deriving from MemcardSerialTask. The object is 0x30 bytes. When the work ends, OnStop() tells mOwner and does not record a result.
◆ ~MCLoadFileTask()
| MCLoadFileTask::~MCLoadFileTask |
( |
| ) |
|
|
overridedefault |
Destroy the object.
- Ghidra address:
- NTSC-U/C: 0x00352250
- Ghidra address:
- PAL: 0x003bf4d0
◆ MCLoadFileTask()
| MCLoadFileTask::MCLoadFileTask |
( |
| ) |
|
Construct the steps.
- Ghidra address:
- NTSC-U/C: 0x0015e4b8
- Ghidra address:
- PAL: 0x0015fcf8
◆ Set()
| void MCLoadFileTask::Set |
( |
MemcardSerialTask * | pOwner, |
|
|
int | nPort, |
|
|
const char * | pszName, |
|
|
void * | pBuffer, |
|
|
int | nSize ) |
Prepare the work.
- Parameters
-
| pOwner | The task that learns when the work ends through OnFileLoaded(), or null. |
| nPort | The memory card slot. |
| pszName | The file. |
| pBuffer | Receives the bytes. The caller retains it. |
| nSize | The number of bytes. |
- Ghidra address:
- NTSC-U/C: 0x0015e600
- Ghidra address:
- PAL: 0x0015fe40
◆ OnStop()
| void MCLoadFileTask::OnStop |
( |
| ) |
|
|
overrideprotectedvirtual |
Tell mOwner that the work ended.
- Ghidra address:
- NTSC-U/C: 0x0015e5c8
- Ghidra address:
- PAL: 0x0015fe08
Reimplemented from Task.
The documentation for this class was generated from the following file: