resonance 1.0.1
Loading...
Searching...
No Matches
IBFileStream Class Reference

Input stream over a C library FILE. More...

#include <ibfilestream.h>

Inheritance diagram for IBFileStream:
Collaboration diagram for IBFileStream:

Public Member Functions

 IBFileStream (const HxStr &path)
 Open a file for reading.
virtual ~IBFileStream ()
 Close the file.
virtual IBStream & Read (void *pDest, int nSize)
virtual IBStream & Seek (int nOffset, int nWhence)
virtual int Tell ()
virtual int Eof ()
virtual int Fail ()
virtual IBStream & Flush ()
Public Member Functions inherited from IBStream
virtual IBStream & ReadLE (void *pDest, int nSize)
 Move nSize bytes into pDest through the virtual Read().
virtual ~IBStream ()
 Close the stream.

Detailed Description

Input stream over a C library FILE.

Its RTTI descriptor is at 0x00901bc0. It has single inheritance from IBStream at offset 0. The type function is at 0x004ed888. The object is 8 bytes. Its vtable at 0x00824248 runs to slot 8 and does not add an entry. Two call sites construct one.

Every transfer goes to fread with a one-byte element size, and the end and failure tests read bits 0x20 and 0x40 of the FILE flags rather than calling feof and ferror, which is the inlined form of those two macros. A path that fails to open produces a null FILE, which Fail() then reports, and the destructor closes it with no null test.

Constructor & Destructor Documentation

◆ IBFileStream()

IBFileStream::IBFileStream ( const HxStr & path)

Open a file for reading.

An empty path arrives at fopen as the program-wide empty string rather than as null.

Parameters
pathThe file to open.
Ghidra address:
NTSC-U/C: 0x004edd38
Ghidra address:
PAL: 0x0052c8e0

◆ ~IBFileStream()

virtual IBFileStream::~IBFileStream ( )
virtual

Close the file.

Ghidra address:
NTSC-U/C: 0x004edd88
Ghidra address:
PAL: 0x0052c930

Member Function Documentation

◆ Read()

virtual IBStream & IBFileStream::Read ( void * pDest,
int nSize )
virtual
Ghidra address:
NTSC-U/C: 0x004edde0
Ghidra address:
PAL: 0x0052c988

Implements IBStream.

◆ Seek()

virtual IBStream & IBFileStream::Seek ( int nOffset,
int nWhence )
virtual
Ghidra address:
NTSC-U/C: 0x004ede20
Ghidra address:
PAL: 0x0052c9c8

Implements IBStream.

◆ Tell()

virtual int IBFileStream::Tell ( )
virtual
Ghidra address:
NTSC-U/C: 0x004ede78
Ghidra address:
PAL: 0x0052ca20

Implements IBStream.

◆ Eof()

virtual int IBFileStream::Eof ( )
virtual
Ghidra address:
NTSC-U/C: 0x004edea0
Ghidra address:
PAL: 0x0052ca48

Implements IBStream.

◆ Fail()

virtual int IBFileStream::Fail ( )
virtual
Ghidra address:
NTSC-U/C: 0x004edeb8
Ghidra address:
PAL: 0x0052ca60

Implements IBStream.

◆ Flush()

virtual IBStream & IBFileStream::Flush ( )
virtual
Ghidra address:
NTSC-U/C: 0x004ede18
Ghidra address:
PAL: 0x0052c9c0

Implements IBStream.


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