Evo C++ Library v0.5.1
|
#include <evo/iobase.h>
Base binary stream interface.
Public Member Functions | |
IoBase () | |
Constructor. More... | |
virtual | ~IoBase () |
Destructor. More... | |
Error | error () const |
Get error code from last operation. More... | |
bool | excep () const |
Get whether exceptions are enabled. More... | |
void | excep (bool val) |
Set whether exceptions are enabled. More... | |
virtual bool | flush () |
Flush any pending output in stream write buffer, if buffered. More... | |
virtual bool | isopen () const |
Get whether stream is open. More... | |
operator SafeBoolType () const | |
Safe (explicit) evaluation as bool type. More... | |
bool | operator! () const |
Negation operator checks whether an error was set by a previous operation. More... | |
virtual ulong | readbin (void *buf, ulong size) |
Read binary input from stream. More... | |
virtual ulong | writebin (const void *buf, ulong size) |
Write binary output to stream. More... | |
Protected Attributes | |
Error | error_ |
Last error code. More... | |
bool | excep_ |
Whether to throw exceptions. More... | |
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inline |
Get error code from last operation.
|
inline |
Get whether exceptions are enabled.
|
inline |
Set whether exceptions are enabled.
val | Whether to enable exceptions |
|
inlinevirtual |
Flush any pending output in stream write buffer, if buffered.
Reimplemented in Stream< T >, Stream< IoFile >, Stream< IoSocket >, StreamOut< T >, and StreamOut< IoFile >.
|
inlinevirtual |
Get whether stream is open.
Reimplemented in Stream< T >, Stream< IoFile >, Stream< IoSocket >, StreamOut< T >, StreamOut< IoFile >, StreamIn< T >, and StreamIn< IoFile >.
|
inlineinherited |
Safe (explicit) evaluation as bool type.
|
inline |
|
inlinevirtual |
Read binary input from stream.
buf | Buffer to store data read |
size | Size to read |
Reimplemented in SocketCast, Stream< T >, Stream< IoFile >, Stream< IoSocket >, StreamIn< T >, and StreamIn< IoFile >.
|
inlinevirtual |
Write binary output to stream.
buf | Data to write |
size | Size to write |
Reimplemented in SocketCast, Stream< T >, Stream< IoFile >, Stream< IoSocket >, StreamOut< T >, and StreamOut< IoFile >.
|
protected |
Last error code.
|
protected |
Whether to throw exceptions.