42 byte*
ptr()
const {
return ptr_; }
70 if (end_ ==
nullptr) {
87 if (end_ ==
nullptr)
return 0;
88 if (
count > (
size_t)(end_ - ptr_)) {
105 const byte*
ptr()
const {
return ptr_; }
117template <
typename Collection>
126 void write(
byte b) { *itr_++ = (
typename Collection::value_type)
b; }
149 std::back_insert_iterator<Collection> itr_;
void flush()
Flushes output (no-op).
size_t write(const byte *buf, size_t count)
Appends count bytes to target collection.
BackInsertingIterator(Collection &c)
Creates iterator appending to collection c.
void write(byte b)
Appends one byte to target collection.
Status status() const
Returns current status (kOk).
Bounded output iterator writing from given address up to end.
MemoryOutputIterator(byte *ptr, const byte *end)
Creates bounded iterator over [ptr, end).
MemoryOutputIterator(byte buf[N])
Creates bounded iterator over fixed array.
void flush()
Flushes output (no-op).
void write(byte v)
Writes one byte.
const byte * ptr() const
Returns current output pointer.
size_t write(const byte *buf, size_t count)
Writes up to count bytes.
Status status() const
Returns current status.
Infinite output iterator writing to memory from given address.
byte * ptr() const
Returns current output pointer.
void write(byte v)
Writes one byte and advances output pointer.
UnsafeMemoryOutputIterator(byte *ptr)
Creates iterator starting at ptr.
Status status() const
Returns current status (kOk).
size_t write(const byte *buf, size_t count)
Writes count bytes and advances output pointer.
void flush()
Flushes output (no-op).
roo::basic_string_view< CharT, Traits > basic_string_view