Stream over a buffer the stream owns and grows.
More...
#include <memstream.h>
|
| | MemStream () |
| | Construct an empty stream with kMemStreamReserve bytes reserved.
|
| virtual | ~MemStream () |
| virtual Stream & | Read (void *pDest, int nSize) |
| virtual Stream & | Write (const void *pSrc, int nSize) |
| virtual Stream & | Flush () |
| virtual Stream & | Seek (int nOffset, int nWhence) |
| virtual int | Tell () |
| virtual int | Eof () |
| virtual int | Fail () |
| void | Compact () |
| | Drop the bytes already read from the front of the buffer and rewind the cursor.
|
| virtual Stream & | ReadLE (void *pDest, int nSize) |
| | Move nSize bytes into pDest, correcting the byte order for the host.
|
| virtual Stream & | WriteLE (const void *pSrc, int nSize) |
| | Move nSize bytes out of pSrc, correcting the byte order for the file.
|
| virtual | ~Stream () |
| | Close the stream.
|
| Stream & | ReadString (HxStr &name) |
| | Read a NUL-terminated name and append it to a string.
|
Stream over a buffer the stream owns and grows.
Its RTTI descriptor is at 0x008ef190. It has single inheritance from Rnd::Stream at offset 0. The object is 0x1c bytes and its vtable is at 0x00826178. The end and failure states are stored rather than derived. Storing them separates this class from Rnd::BufStream.
◆ MemStream()
| Rnd::MemStream::MemStream |
( |
| ) |
|
Construct an empty stream with kMemStreamReserve bytes reserved.
- Ghidra address:
- NTSC-U/C: 0x0050f288
- Ghidra address:
- PAL: 0x0054e870
◆ ~MemStream()
| virtual Rnd::MemStream::~MemStream |
( |
| ) |
|
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x0050fca0
- Ghidra address:
- PAL: 0x0054f288
◆ Read()
| virtual Stream & Rnd::MemStream::Read |
( |
void * | pDest, |
|
|
int | nSize ) |
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x005100c0
- Ghidra address:
- PAL: 0x0054f6a8
Implements Rnd::Stream.
◆ Write()
| virtual Stream & Rnd::MemStream::Write |
( |
const void * | pSrc, |
|
|
int | nSize ) |
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x0050f448
- Ghidra address:
- PAL: 0x0054ea30
Implements Rnd::Stream.
◆ Flush()
| virtual Stream & Rnd::MemStream::Flush |
( |
| ) |
|
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x0050fd48
- Ghidra address:
- PAL: 0x0054f330
Implements Rnd::Stream.
◆ Seek()
| virtual Stream & Rnd::MemStream::Seek |
( |
int | nOffset, |
|
|
int | nWhence ) |
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x00510140
- Ghidra address:
- PAL: 0x0054f728
Implements Rnd::Stream.
◆ Tell()
| virtual int Rnd::MemStream::Tell |
( |
| ) |
|
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x0050fd50
- Ghidra address:
- PAL: 0x0054f338
Implements Rnd::Stream.
◆ Eof()
| virtual int Rnd::MemStream::Eof |
( |
| ) |
|
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x0050fd58
- Ghidra address:
- PAL: 0x0054f340
Implements Rnd::Stream.
◆ Fail()
| virtual int Rnd::MemStream::Fail |
( |
| ) |
|
|
virtual |
- Ghidra address:
- NTSC-U/C: 0x0050fd60
- Ghidra address:
- PAL: 0x0054f348
Implements Rnd::Stream.
◆ Compact()
| void Rnd::MemStream::Compact |
( |
| ) |
|
Drop the bytes already read from the front of the buffer and rewind the cursor.
The unread tail moves to the start of the buffer, and the buffer shrinks by the old cursor position. No call site survives in the shipped program.
- Ghidra address:
- NTSC-U/C: 0x005101c8
- Ghidra address:
- PAL: 0x0054f7b0
The documentation for this class was generated from the following file: