#include <icy/buffer.h>Inherits:
BitWriter
Class for reading/writing dynamically resizable binary streams.
Note that when using the constructor with the Buffer reference as an argument, the writer will dynamically expand the given buffer when writing passed the buffer capacity. All other cases will throw a std::out_of_range error when writing past the buffer capacity.
| Return | Name | Description |
|---|---|---|
DynamicBitWriter | Constructs a [DynamicBitWriter](#dynamicbitwriter) backed by a dynamically resizable Buffer. The buffer is expanded automatically as data is written. | |
DynamicBitWriter | Constructs a [DynamicBitWriter](#dynamicbitwriter) that inserts data starting at a specific iterator position. | |
void | put virtual | Append bytes to the buffer. Throws a std::out_of_range exception if reading past the limit. |
bool | update virtual | Update a byte range. Throws a std::out_of_range exception if reading past the limit. |
DynamicBitWriter(Buffer & buf, ByteOrder order)Constructs a [DynamicBitWriter](#dynamicbitwriter) backed by a dynamically resizable Buffer. The buffer is expanded automatically as data is written.
buf Buffer to write into; expanded as needed.
order Byte order used for multi-byte integer writes.
DynamicBitWriter(Buffer & buf, Buffer::iterator offset, ByteOrder order)Constructs a [DynamicBitWriter](#dynamicbitwriter) that inserts data starting at a specific iterator position.
buf Buffer to write into; expanded as needed.
offset Iterator into buf indicating the insertion start point.
order Byte order used for multi-byte integer writes.
virtual
virtual void put(const char * val, size_t len)Append bytes to the buffer. Throws a std::out_of_range exception if reading past the limit.
virtual
virtual bool update(const char * val, size_t len, size_t pos)Update a byte range. Throws a std::out_of_range exception if reading past the limit.
Buffer & _buffersize_t _offset