|
roo_io
API Documentation for roo_io
|
Infinite iterator reading from memory starting at provided address. More...
#include <memory_input_iterator.h>
Public Types | |
| using | PtrType = PtrTypeT |
Public Member Functions | |
| UnsafeGenericMemoryIterator (PtrType ptr) | |
Creates iterator starting at ptr. | |
| byte | read () |
| Returns byte at current pointer and advances by one. | |
| size_t | read (byte *result, size_t count) |
Copies count bytes from current pointer, then advances by count. | |
| void | skip (size_t count) |
Advances pointer by count bytes. | |
| Status | status () const |
Returns kOk unconditionally. | |
| PtrType | ptr () const |
| Returns current pointer. | |
Protected Attributes | |
| PtrTypeT | ptr_ |
Infinite iterator reading from memory starting at provided address.
Reader controls bounds externally.
Memory footprint: one pointer (4 bytes on 32-bit targets).
Implements input iterator contract.
Definition at line 17 of file memory_input_iterator.h.
| using roo_io::UnsafeGenericMemoryIterator< PtrTypeT >::PtrType = PtrTypeT |
Definition at line 19 of file memory_input_iterator.h.
|
inline |
Creates iterator starting at ptr.
Definition at line 22 of file memory_input_iterator.h.
|
inline |
Returns current pointer.
Definition at line 47 of file memory_input_iterator.h.
References roo_io::UnsafeGenericMemoryIterator< PtrTypeT >::ptr_.
|
inline |
Returns byte at current pointer and advances by one.
Does not modify status (status() is always kOk).
Definition at line 27 of file memory_input_iterator.h.
References roo_io::UnsafeGenericMemoryIterator< PtrTypeT >::ptr_.
|
inline |
Copies count bytes from current pointer, then advances by count.
Does not modify status (status() is always kOk).
Definition at line 32 of file memory_input_iterator.h.
References roo_io::count, and roo_io::UnsafeGenericMemoryIterator< PtrTypeT >::ptr_.
|
inline |
Advances pointer by count bytes.
Does not modify status (status() is always kOk).
Definition at line 41 of file memory_input_iterator.h.
References roo_io::count, and roo_io::UnsafeGenericMemoryIterator< PtrTypeT >::ptr_.
|
inline |
Returns kOk unconditionally.
Definition at line 44 of file memory_input_iterator.h.
References roo_io::kOk.
|
protected |