|
wavelength 1.0.0
|
Read-only file of the main archive, read through the disc cache. More...
#include <arkfile.h>


Public Member Functions | |
| ArkFile (const char *pszFile, int nMode) | |
| Find a file in the main archive. | |
| ~ArkFile () override | |
| Drop the reads still waiting for the disc. | |
| int | Read (void *pBuffer, int nBytes) override |
| Read bytes and wait for them. | |
| bool | ReadAsync (void *pBuffer, int nBytes) override |
| Start reading bytes, one task for each block of the disc they cover. | |
| int | Write (const void *pBuffer, int nBytes) override |
| Report that an archive file cannot be written. | |
| int | Seek (int nOffset, int nOrigin) override |
| Move the position. | |
| int | Tell () override |
| Report the position. | |
| void | Flush () override |
| Do nothing. | |
| bool | Eof () override |
| Report whether the position is at the end. | |
| bool | Fail () override |
| Report whether the file was not found. | |
| int | Size () override |
| Report the size. | |
| int | UncompressedSize () override |
| Report the size before compression. | |
| bool | ReadDone (int *pnBytes) override |
| Advance the disc cache and report whether every task of the read finished. | |
| void | TaskDone (int nBytes) |
| Count a finished task of the read. | |
| ArkFile (const char *name, int mode) | |
| Find a file in the archive. | |
| virtual | ~ArkFile () |
| Drop the reads still waiting for blocks. | |
| virtual int | Read (void *data, int bytes) |
| Read bytes and wait for them. | |
| virtual bool | ReadAsync (void *data, int bytes) |
| Queue a read of each block the bytes cover, at most up to the end of the file. | |
| virtual int | Write (const void *data, int bytes) |
| Fail, because the archive is read-only. | |
| virtual int | Seek (int offset, int origin) |
| Move the position. | |
| virtual int | Tell () |
| Report the position. | |
| virtual void | Flush () |
| Do nothing. | |
| virtual bool | Eof () |
| Report whether the position is at the end. | |
| virtual bool | Fail () |
| Report whether the file was not found or was opened for writing. | |
| virtual int | Size () |
| Report the size in the archive. | |
| virtual int | UncompressedSize () |
| Report the size before compression. | |
| virtual bool | ReadDone (int *bytes) |
| Poll the block manager and report whether every block of the read arrived. | |
| void | TaskDone (int bytes) |
| Count the bytes one block delivered. | |
| Public Member Functions inherited from File | |
| virtual | ~File () |
| Close the file. | |
| virtual | ~File () |
| Close the file. | |
Static Public Member Functions | |
| static const char * | ArchivePath (const char *pszPath) |
| Express a path relative to the root of the game files, as the archive records it. | |
| Static Public Member Functions inherited from File | |
| static File * | New (const char *pszPath, int nMode, int nFlags) |
| Open a file. | |
Additional Inherited Members | |
| Public Types inherited from File | |
| enum | Mode { kModeRead = 1 , kModeWrite = 2 } |
| Open modes of New(). More... | |
| Static Public Attributes inherited from File | |
| static constexpr int | kFlagNoArchive = 1 |
| The open flags New() takes to read even a disc file through AsyncFile. | |
Read-only file of the main archive, read through the disc cache.
Read-only file inside the archive, read through the block manager.
The RTTI includes the class name and records File as the base.
The RTTI records the class as deriving from File. The object is 0x40 bytes.
| ArkFile::ArkFile | ( | const char * | pszFile, |
| int | nMode ) |
Find a file in the main archive.
| pszFile | The file, relative to the root of the game files. |
| nMode | The open mode. A mode that writes fails. |
|
override |
Drop the reads still waiting for the disc.
| ArkFile::ArkFile | ( | const char * | name, |
| int | mode ) |
Find a file in the archive.
Writing fails.
| name | The path. |
| mode | The open mode, a combination of FileOpenMode bits. |
|
virtual |
Drop the reads still waiting for blocks.
|
static |
Express a path relative to the root of the game files, as the archive records it.
| pszPath | The path. |
|
overridevirtual |
Read bytes and wait for them.
| pBuffer | Receives the bytes. |
| nBytes | The number of bytes. |
Implements File.
|
overridevirtual |
Start reading bytes, one task for each block of the disc they cover.
| pBuffer | Receives the bytes. |
| nBytes | The number of bytes, cut at the end of the file. |
Implements File.
|
overridevirtual |
Report that an archive file cannot be written.
| pBuffer | The bytes. |
| nBytes | The number of bytes. |
Implements File.
|
overridevirtual |
Move the position.
| nOffset | The offset. |
| nOrigin | The origin of the offset. Another value leaves the position unchanged. |
Implements File.
|
inlineoverridevirtual |
Report the position.
Implements File.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Report whether the position is at the end.
Implements File.
|
inlineoverridevirtual |
Report whether the file was not found.
Implements File.
|
inlineoverridevirtual |
Report the size.
Implements File.
|
inlineoverridevirtual |
Report the size before compression.
Implements File.
|
overridevirtual |
Advance the disc cache and report whether every task of the read finished.
| pnBytes | Receives the number of bytes read once the read finished. |
Implements File.
| void ArkFile::TaskDone | ( | int | nBytes | ) |
Count a finished task of the read.
| nBytes | The bytes the task copied. |
|
virtual |
Read bytes and wait for them.
| data | Receives the bytes. |
| bytes | The number of bytes. |
Implements File.
|
virtual |
Queue a read of each block the bytes cover, at most up to the end of the file.
| data | Receives the bytes. |
| bytes | The number of bytes. |
Implements File.
|
virtual |
Fail, because the archive is read-only.
| data | The bytes. |
| bytes | The number of bytes. |
Implements File.
|
virtual |
Move the position.
The position is not clamped.
| offset | The offset. |
| origin | The origin, one of BinStream::SeekType. |
Implements File.
|
virtual |
|
virtual |
Do nothing.
The linker merged the body with DebugPrint().
Implements File.
|
virtual |
Report whether the position is at the end.
Implements File.
|
virtual |
Report whether the file was not found or was opened for writing.
Implements File.
|
virtual |
Report the size in the archive.
Implements File.
|
virtual |
Report the size before compression.
Implements File.
|
virtual |
Poll the block manager and report whether every block of the read arrived.
| bytes | Receives the number of bytes read when the read is complete. |
Implements File.
| void ArkFile::TaskDone | ( | int | bytes | ) |
Count the bytes one block delivered.
| bytes | The number of bytes. |