|
roo_io
API Documentation for roo_io
|
#include <null_output_stream.h>
Public Member Functions | |
| NullOutputStream (Status error=kClosed) | |
| void | close () override |
| Flushes and closes this stream. | |
| Status | status () const override |
| Returns underlying stream status. | |
| size_t | write (const byte *buf, size_t count) override |
Attempts to write up to count bytes from buf. | |
Public Member Functions inherited from roo_io::OutputStream | |
| virtual | ~OutputStream () |
| bool | isOpen () const |
| Returns whether stream is considered open. | |
| virtual size_t | tryWrite (const byte *buf, size_t count) |
| Attempts to write without indefinite blocking. | |
| virtual size_t | writeFully (const byte *buf, size_t count) |
Attempts to write count bytes from buf. | |
| virtual void | flush () |
| Flushes buffered data to the underlying sink. | |
Definition at line 8 of file null_output_stream.h.
Definition at line 10 of file null_output_stream.h.
|
inlineoverridevirtual |
Flushes and closes this stream.
On success, if status was kOk, status transitions to kClosed. On failure, status reflects encountered error.
Reimplemented from roo_io::OutputStream.
Definition at line 12 of file null_output_stream.h.
|
inlineoverridevirtual |
Returns underlying stream status.
Updated by write/flush operations. Status is either kOk or an error (never kEndOfStream).
Implements roo_io::OutputStream.
Definition at line 14 of file null_output_stream.h.
Attempts to write up to count bytes from buf.
Updates status.
Contract:
status() == kOk), returns at least one byte.If pre-call status is not kOk, call should have no effect and return zero.
Successful return does not guarantee data reached final sink until flush() succeeds.
Implements roo_io::OutputStream.
Definition at line 16 of file null_output_stream.h.