Base class for streams.
More...
#include <ibstream.h>
Base class for streams.
- read/write binary data from/to stream
- get/set stream read-write position (read and write position is the same)
◆ IStreamSeekMode
Enumerator |
---|
kIBSeekSet | set absolute seek position
|
kIBSeekCur | set seek position relative to current position
|
kIBSeekEnd | set seek position relative to stream end
|
◆ read()
virtual tresult read |
( |
void * |
buffer, |
|
|
int32 |
numBytes, |
|
|
int32 * |
numBytesRead = nullptr |
|
) |
| |
|
pure virtual |
Reads binary data from stream.
- Parameters
-
buffer | : destination buffer |
numBytes | : amount of bytes to be read |
numBytesRead | : result - how many bytes have been read from stream (set to 0 if this is of no interest) |
◆ write()
virtual tresult write |
( |
void * |
buffer, |
|
|
int32 |
numBytes, |
|
|
int32 * |
numBytesWritten = nullptr |
|
) |
| |
|
pure virtual |
Writes binary data to stream.
- Parameters
-
buffer | : source buffer |
numBytes | : amount of bytes to write |
numBytesWritten | : result - how many bytes have been written to stream (set to 0 if this is of no interest) |
◆ seek()
Sets stream read-write position.
- Parameters
-
pos | : new stream position (dependent on mode) |
mode | : value of enum IStreamSeekMode |
result | : new seek position (set to 0 if this is of no interest) |
◆ tell()
Gets current stream read-write position.
- Parameters
-
pos | : is assigned the current position if function succeeds |
◆ iid