IOStream

I/O abstraction, to support load/write from a file, from memory, or from user-provided callbacks.

Members

Functions

rewind
bool rewind(IOHandle handle)

Seek to beginning of the I/O stream.

seekAbsolute
bool seekAbsolute(IOHandle handle, c_long offset)

Seek to asolute position in the I/O stream. Useful because some function need to preserve it.

setupForFileIO
void setupForFileIO()

Setup the IOStream for reading a file. The passed IOHandle will need to be a FILE*. For internal Gamut usage.

setupForMemoryIO
void setupForMemoryIO()

Setup the IOStream for using a a file. The passed IOHandle will need to be a MemoryFile*. For internal Gamut usage.

setupSetupForLogging
void setupSetupForLogging(IOStream io)

Setup the IOStream for wrapping another IOStream and logging what happens. The passed IOHandle will need to be a WrappedIO. For internal Gamut usage.

skipBytes
bool skipBytes(IOHandle handle, int nbytes)

Skip bytes.

Variables

eof
EofProc eof;

A function with semantics and signature similar to feof.

read
ReadProc read;

A function with semantics and signature similar to fread.

seek
SeekProc seek;

A function with semantics and signature similar to fseek.

tell
TellProc tell;

A function with semantics and signature similar to ftell.

write
WriteProc write;

A function with semantics and signature similar to fwrite.

Meta