|
resonance 1.0.1
|
Measure the kilobytes a SaveFileMCT's files need beyond the space they occupy on the card now. More...
#include <savespacecheckermct.h>


Public Member Functions | |
| SaveSpaceCheckerMCT (SaveFileMCT *pOwner, const std::vector< SaveFileEntry > *pFiles, const HxStr &dirName, Memcard *pCard, int nPortSlot, int nCookie) | |
| Construct the check and list the save directory. | |
| virtual | ~SaveSpaceCheckerMCT () |
| virtual void | OnListDir (ListDirOp *pOp) |
| Measure the files against the listing and report to the owner. | |
| virtual void | Finish () |
| Do nothing. | |
| virtual void | Execute () |
| Write a diagnostic with the routine's name to cout. | |
| Public Member Functions inherited from MemcardTask | |
| MemcardTask (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie) | |
| Construct an idle task against one card slot. | |
| MemcardTask (MemcardUser *pUser, Memcard *pCard, int nCookie) | |
| Construct an idle task that does not address a single card slot. | |
| virtual void | UnusedHook () |
| Do nothing. | |
| Public Member Functions inherited from MemcardCBHandler | |
| virtual | ~MemcardCBHandler () |
| Release the receiver. | |
| virtual void | OnCheckInfo (CheckInfoOp *pOp) |
| Report a finished card enquiry. | |
| virtual void | OnEntSpace (EntSpaceOp *pOp) |
| Report a finished free-entry enquiry. | |
| virtual void | OnFormat (FormatOp *pOp) |
| Report a finished format. | |
| virtual void | OnUnformat (UnformatOp *pOp) |
| Report a finished unformat. | |
| virtual void | OnCreateDir (CreateDirOp *pOp) |
| Report a finished directory creation. | |
| virtual void | OnRead (ReadOp *pOp) |
| Report a finished read. | |
| virtual void | OnWrite (WriteOp *pOp) |
| Report a finished write. | |
| virtual void | OnOpenWrite (OpenWriteOp *pOp) |
| Report a finished open for writing. | |
| virtual void | OnOpenRead (OpenReadOp *pOp) |
| Report a finished open for reading. | |
| virtual void | OnClose (CloseOp *pOp) |
| Report a finished close. | |
| virtual void | OnSeek (SeekOp *pOp) |
| Report a finished seek. | |
| virtual void | OnDeleteFile (DeleteFileOp *pOp) |
| Report a finished file deletion. | |
| virtual void | OnRenameFile (RenameFileOp *pOp) |
| Report a finished rename. | |
Additional Inherited Members | |
| Protected Member Functions inherited from MemcardTask | |
| void | HandleError () |
| Abandon the task when the last operation reported a failure. | |
| Protected Attributes inherited from MemcardTask | |
| MemcardUser * | mUser |
| Memcard * | mCard |
| int | mCookie |
| int | mPortSlot |
| int | mState |
| int | mStatus |
Measure the kilobytes a SaveFileMCT's files need beyond the space they occupy on the card now.
The European release added the class, and the North American release has no counterpart. Its RTTI type name is SaveSpaceCheckerMCT. It has single inheritance from MemcardTask at offset
SaveFileMCT constructs the task directly instead of queueing it through MemcardManager. The task has no MemcardUser, and Execute() never runs. The constructor lists the save directory at once, and OnListDir() reports the measurement directly to the SaveFileMCT that started it, through SaveFileMCT::OnSpaceChecked(). A file already in the directory costs the kilobytes it grows by, a missing file costs its full size, and a missing directory costs two kilobytes more. Each pair of new files, rounding up, costs one kilobyte of directory entries. A kilobyte here is one card cluster.
The owner deletes the task when it creates the directory.
| SaveSpaceCheckerMCT::SaveSpaceCheckerMCT | ( | SaveFileMCT * | pOwner, |
| const std::vector< SaveFileEntry > * | pFiles, | ||
| const HxStr & | dirName, | ||
| Memcard * | pCard, | ||
| int | nPortSlot, | ||
| int | nCookie ) |
Construct the check and list the save directory.
The listing covers every entry of dirName, through the wildcard *.
| pOwner | The save the measurement is for. |
| pFiles | The files the save writes. The vector stays in pOwner and is not copied. |
| dirName | The save directory. The task stores a copy. |
| pCard | The queue the task submits operations to. |
| nPortSlot | The packed port and slot. |
| nCookie | The tag that abandons exactly this task's operations. |
|
virtual |
|
virtual |
Measure the files against the listing and report to the owner.
A failed listing other than kMemcardStatusNoDirectory abandons the task's operations and still reports to the owner, with a measurement of zero.
| pOp | The finished listing. |
Reimplemented from MemcardCBHandler.
|
virtual |
|
virtual |
Write a diagnostic with the routine's name to cout.
The routine is never called.
Implements MemcardTask.