DynamicBuffer
A DynamicBuffer represents a memory storage that may be automatically resized as required, where the memory is divided into an input sequence followed by an output sequence. 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, such as the send or receive operations of a socket. Data written to the output sequence of a dynamic buffer object is appended to the input sequence of the same object.
Requirements
-
D
denotes a dynamic buffer class. -
a
denotes a value of typeD
. -
c
denotes a (possibly const) value of typeD
. -
n
denotes a value of typestd::size_t
. -
T
denotes a type meeting the requirements forConstBufferSequence
. -
U
denotes a type meeting the requirements forMutableBufferSequence
.
Expression | Type | Semantics, Pre/Post-conditions |
---|---|---|
|
|
This type represents the memory associated with the input sequence. |
|
|
This type represents the memory associated with the output sequence. |
|
|
Returns the size, in bytes, of the input sequence. |
|
|
Returns the permitted maximum of the sum of the sizes of the input sequence and output sequence. |
|
|
Returns the maximum sum of the sizes of the input sequence and output sequence that the dynamic buffer can hold without requiring reallocation. |
|
|
Returns a constant buffer sequence |
|
|
Returns a mutable buffer sequence u representing the output sequence, and where Throws: |
|
Appends |
|
|
Removes |