![]() |
PIP 5.6.1
Platform-Independent Primitives
|
PIBinaryStream adapter over a PIIODevice. More...
#include <piiostream.h>

Public Member Functions | |
| PIIOBinaryStream (PIIODevice *device=nullptr) | |
| Constructs a stream bound to "device". | |
| void | setDevice (PIIODevice *device) |
| Rebinds the stream to "device" and resets read-error state. | |
| bool | binaryStreamAppendImp (const void *d, size_t s) |
| Appends raw bytes through the bound device. | |
| bool | binaryStreamTakeImp (void *d, size_t s) |
| Reads raw bytes from the bound device. | |
| ssize_t | binaryStreamSizeImp () const |
| Returns the number of bytes currently available in the device. | |
Public Member Functions inherited from PIBinaryStream< PIIOBinaryStream > | |
| bool | binaryStreamAppend (const void *d, size_t s) |
| Writes raw bytes to the underlying stream. | |
| void | binaryStreamAppend (T v) |
| Writes one trivially copied value as raw bytes. | |
| bool | binaryStreamTake (void *d, size_t s) |
| Reads raw bytes from the underlying stream and sets read error state on short reads. | |
| ssize_t | binaryStreamSize () const |
| Returns remaining readable byte count. More... | |
| int | binaryStreamTakeInt () |
Reads one int value from the stream. | |
| bool | wasReadError () const |
| Returns whether there has been an incomplete read since last resetReadError() or after the stream was created. | |
| void | resetReadError () |
| Reset incomplete read flag. | |
Additional Inherited Members | |
Related Functions inherited from PIBinaryStream< PIIOBinaryStream > | |
| #define | BINARY_STREAM_FRIEND(T) |
Declares templated binary stream operators as friends of T. | |
| #define | BINARY_STREAM_WRITE(T) |
Starts definition of a templated binary write operator for T. | |
| #define | BINARY_STREAM_READ(T) |
Starts definition of a templated binary read operator for T. | |
PIBinaryStream adapter over a PIIODevice.
Provides binary stream operations for PIIODevice-based devices. See Input/Output stream for the generic stream API.