|
roo_io
API Documentation for roo_io
|
Bounded output iterator writing from given address up to end.
More...
#include <memory_output_iterator.h>
Public Member Functions | |
| MemoryOutputIterator (byte *ptr, const byte *end) | |
Creates bounded iterator over [ptr, end). | |
| template<size_t N> | |
| MemoryOutputIterator (byte buf[N]) | |
| Creates bounded iterator over fixed array. | |
| void | write (byte v) |
| Writes one byte. | |
| size_t | write (const byte *buf, size_t count) |
Writes up to count bytes. | |
| Status | status () const |
| Returns current status. | |
| const byte * | ptr () const |
| Returns current output pointer. | |
| void | flush () |
| Flushes output (no-op). | |
Bounded output iterator writing from given address up to end.
Writing past end is rejected and status becomes kNoSpaceLeftOnDevice.
Definition at line 56 of file memory_output_iterator.h.
Creates bounded iterator over [ptr, end).
Definition at line 59 of file memory_output_iterator.h.
Creates bounded iterator over fixed array.
Definition at line 63 of file memory_output_iterator.h.
|
inline |
Flushes output (no-op).
Does not modify status.
Definition at line 110 of file memory_output_iterator.h.
Returns current output pointer.
Definition at line 105 of file memory_output_iterator.h.
|
inline |
Returns current status.
kOk when space remains; kNoSpaceLeftOnDevice after overflow. Definition at line 100 of file memory_output_iterator.h.
References roo_io::kNoSpaceLeftOnDevice, and roo_io::kOk.
Writes one byte.
If no space remains, write is ignored and status becomes kNoSpaceLeftOnDevice.
Definition at line 69 of file memory_output_iterator.h.
Writes up to count bytes.
If available space is smaller than count, writes available prefix, updates status to kNoSpaceLeftOnDevice, and returns bytes written.
Definition at line 86 of file memory_output_iterator.h.
References roo_io::count.