boost::capy::flat_dynamic_buffer
A fixed‐capacity linear buffer satisfying DynamicBuffer.
Example
char storage[1024];
flat_dynamic_buffer fb( storage, sizeof( storage ) );
// Write data
auto mb = fb.prepare( 100 );
std::memcpy( mb.data(), "hello", 5 );
fb.commit( 5 );
// Read data
auto data = fb.data();
// process data...
fb.consume( 5 );
Types
Name |
Description |
The ConstBufferSequence type for readable bytes. |
|
Indicates this is a DynamicBuffer adapter over external storage. |
|
The MutableBufferSequence type for writable bytes. |
Member Functions
Name |
Description |
|
Constructors |
Copy assignment. |
|
Return the number of writable bytes without reallocation. |
|
Move bytes from the output to the input sequence. |
|
Remove bytes from the beginning of the input sequence. |
|
Return a buffer sequence representing the readable bytes. |
|
Return the maximum number of bytes the buffer can hold. |
|
Return a buffer sequence for writing. |
|
Return the number of readable bytes. |
See Also
circular_dynamic_buffer, string_dynamic_buffer
Created with MrDocs