#include <FileByteSource.h>
|
| FileByteSource () |
|
| FileByteSource (const char *filename) |
|
void | Open (const char *filename) |
|
bool | IsOpen () |
|
void | Close () |
|
virtual int | ReadByte () |
|
| ByteSource () |
|
s32 | Read () |
|
void | Unread () |
|
s32 | Peek () |
|
virtual | ~ByteSource () |
|
u32 | GetBytesRead () |
|
bool | Scan (u64 &result) |
|
bool | Scan (s32 &result, Format::Type code=Format::DEC, u32 fieldWidth=U32_MAX) |
|
bool | Scan (u32 &result, Format::Type code=Format::DEC, u32 fieldWidth=U32_MAX) |
|
bool | Scan (ByteSerializable &byteSerializable, s32 argument=0) |
|
bool | ScanLexDigits (u32 &digits) |
|
bool | Scan (ByteSink &result, const u32 fieldWidth) |
|
s32 | ScanSet (ByteSink &result, const char *setSpec) |
|
s32 | SkipSet (const char *setSpec) |
|
s32 | ScanSetFormat (ByteSink &result, const char *&setSpec) |
|
bool | ScanIdentifier (ByteSink &result) |
|
bool | ScanHex (ByteSink &result) |
|
bool | ScanBinary (ByteSink &result) |
|
bool | ScanCamelIdentifier (ByteSink &result) |
|
s32 | SkipWhitespace () |
|
s32 | Scanf (const char *format,...) |
|
s32 | Vscanf (const char *format, va_list &ap) |
|
A ByteSource which uses a file descriptor as its reading source.
MFM::FileByteSource::FileByteSource |
( |
| ) |
|
|
inline |
Constructs a new FileByteSource which is not ready for reading from. One must call Open()
before using.
MFM::FileByteSource::FileByteSource |
( |
const char * |
filename | ) |
|
|
inline |
Constructs a new FileByteSource which is ready for reading from, given that the provided filename is a legal file to open.
- Parameters
-
filename | The path to the FILE that is wished to back this FileByteSource and will therefore be read from. |
void MFM::FileByteSource::Close |
( |
| ) |
|
|
inline |
bool MFM::FileByteSource::IsOpen |
( |
| ) |
|
|
inline |
Checks to see if this FileByteSource is backed by a valid file descriptor and is therefore ready to write to.
- Returns
true
if this FileByteSource is ready to be written to, else false
.
void MFM::FileByteSource::Open |
( |
const char * |
filename | ) |
|
|
inline |
Opens the file at a given path and allows this FileByteSource to begin reading from it. If this FileByteSource is already backed by an open file descriptor, this will do nothing. One should check to see if this FileByteSource IsOpen()
before and after calling this method.
- Parameters
-
filename | The string representing the path to the file wished to back this FileByteSource . |
virtual int MFM::FileByteSource::ReadByte |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: