...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A dynamic buffer using a fixed size internal buffer.
Defined in header <boost/beast/core/flat_static_buffer.hpp>
class flat_static_buffer_base
Name |
Description |
---|---|
The ConstBufferSequence used to represent the readable bytes. |
|
The MutableBufferSequence used to represent the writable bytes. |
Name |
Description |
---|---|
Return the maximum number of bytes, both readable and writable, that can be held without requiring an allocation. |
|
Returns a constant buffer sequence representing the readable bytes. |
|
Clear the readable and writable bytes to zero. |
|
Append writable bytes to the readable bytes. |
|
Remove bytes from beginning of the readable bytes. |
|
Returns a constant buffer sequence representing the readable bytes.
|
|
flat_static_buffer_base [constructor] |
Constructor. |
Return the maximum number of bytes, both readable and writable, that can ever be held. |
|
Returns a mutable buffer sequence representing writable bytes. |
|
Returns the number of readable bytes. |
Name |
Description |
---|---|
flat_static_buffer_base [constructor] |
Constructor. |
Reset the pointed-to buffer. |
A dynamic buffer encapsulates memory storage that may be automatically resized as required, where the memory is divided into two regions: readable bytes followed by writable bytes. These memory regions are internal to the dynamic buffer, but direct access to the elements is provided to permit them to be efficiently used with I/O operations. Objects of this type meet the requirements of DynamicBuffer and have the following additional properties:
Variables are usually declared using the template class flat_static_buffer
; however, to
reduce the number of template instantiations, objects should be passed flat_static_buffer_base
&
.