ゴミ箱
|
#include <multi_buffer.hpp>
Classes | |
class | const_buffers_type |
class | element |
class | mutable_buffers_type |
Public Types | |
using | allocator_type = Allocator |
The type of allocator used. More... | |
Public Member Functions | |
~basic_multi_buffer () | |
Destructor. More... | |
basic_multi_buffer () | |
basic_multi_buffer (std::size_t limit) | |
basic_multi_buffer (Allocator const &alloc) | |
basic_multi_buffer (std::size_t limit, Allocator const &alloc) | |
basic_multi_buffer (basic_multi_buffer &&other) | |
basic_multi_buffer (basic_multi_buffer &&other, Allocator const &alloc) | |
basic_multi_buffer (basic_multi_buffer const &other) | |
basic_multi_buffer (basic_multi_buffer const &other, Allocator const &alloc) | |
template<class OtherAlloc > | |
basic_multi_buffer (basic_multi_buffer< OtherAlloc > const &other) | |
template<class OtherAlloc > | |
basic_multi_buffer (basic_multi_buffer< OtherAlloc > const &other, allocator_type const &alloc) | |
basic_multi_buffer & | operator= (basic_multi_buffer &&other) |
basic_multi_buffer & | operator= (basic_multi_buffer const &other) |
template<class OtherAlloc > | |
basic_multi_buffer & | operator= (basic_multi_buffer< OtherAlloc > const &other) |
allocator_type | get_allocator () const |
Returns a copy of the associated allocator. More... | |
size_type | size () const |
Returns the size of the input sequence. More... | |
size_type | max_size () const |
Returns the permitted maximum sum of the sizes of the input and output sequence. More... | |
std::size_t | capacity () const |
Returns the maximum sum of the sizes of the input sequence and output sequence the buffer can hold without requiring reallocation. More... | |
const_buffers_type | data () const |
mutable_buffers_type | prepare (size_type n) |
void | commit (size_type n) |
void | consume (size_type n) |
Remove bytes from the input sequence. More... | |
template<class OtherAlloc > | |
auto | operator= (basic_multi_buffer< OtherAlloc > const &other) -> basic_multi_buffer & |
Friends | |
template<class OtherAlloc > | |
class | basic_multi_buffer |
template<class Alloc > | |
void | swap (basic_multi_buffer< Alloc > &lhs, basic_multi_buffer< Alloc > &rhs) |
A DynamicBuffer that uses multiple buffers internally.
The implementation uses a sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
Allocator | The allocator to use for managing memory. |
using boost::beast::basic_multi_buffer< Allocator >::allocator_type = Allocator |
The type of allocator used.
boost::beast::basic_multi_buffer< Allocator >::~basic_multi_buffer | ( | ) |
Destructor.
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | ) |
Constructor
Upon construction, capacity will be zero.
|
explicit |
Constructor.
limit | The setting for max_size. |
|
explicit |
Constructor.
alloc | The allocator to use. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | std::size_t | limit, |
Allocator const & | alloc | ||
) |
Constructor.
limit | The setting for max_size. |
alloc | The allocator to use. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | basic_multi_buffer< Allocator > && | other | ) |
Move constructor
After the move, *this
will have an empty output sequence.
other | The object to move from. After the move, The object's state will be as if constructed using its current allocator and limit. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | basic_multi_buffer< Allocator > && | other, |
Allocator const & | alloc | ||
) |
Move constructor
After the move, *this
will have an empty output sequence.
other | The object to move from. After the move, The object's state will be as if constructed using its current allocator and limit. |
alloc | The allocator to use. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | basic_multi_buffer< Allocator > const & | other | ) |
Copy constructor.
other | The object to copy from. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | basic_multi_buffer< Allocator > const & | other, |
Allocator const & | alloc | ||
) |
Copy constructor
other | The object to copy from. |
alloc | The allocator to use. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | basic_multi_buffer< OtherAlloc > const & | other | ) |
Copy constructor.
other | The object to copy from. |
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer | ( | basic_multi_buffer< OtherAlloc > const & | other, |
allocator_type const & | alloc | ||
) |
Copy constructor.
other | The object to copy from. |
alloc | The allocator to use. |
std::size_t boost::beast::basic_multi_buffer< Allocator >::capacity | ( | ) | const |
Returns the maximum sum of the sizes of the input sequence and output sequence the buffer can hold without requiring reallocation.
void boost::beast::basic_multi_buffer< Allocator >::commit | ( | size_type | n | ) |
Move bytes from the output sequence to the input sequence.
void boost::beast::basic_multi_buffer< Allocator >::consume | ( | size_type | n | ) |
Remove bytes from the input sequence.
auto boost::beast::basic_multi_buffer< Allocator >::data | ( | ) | const |
Get a list of buffers that represents the input sequence.
prepare
.
|
inline |
Returns a copy of the associated allocator.
|
inline |
Returns the permitted maximum sum of the sizes of the input and output sequence.
auto boost::beast::basic_multi_buffer< Allocator >::operator= | ( | basic_multi_buffer< Allocator > && | other | ) |
Move assignment
After the move, *this
will have an empty output sequence.
other | The object to move from. After the move, The object's state will be as if constructed using its current allocator and limit. |
auto boost::beast::basic_multi_buffer< Allocator >::operator= | ( | basic_multi_buffer< Allocator > const & | other | ) |
Copy assignment
After the copy, *this
will have an empty output sequence.
other | The object to copy from. |
basic_multi_buffer& boost::beast::basic_multi_buffer< Allocator >::operator= | ( | basic_multi_buffer< OtherAlloc > const & | other | ) |
Copy assignment
After the copy, *this
will have an empty output sequence.
other | The object to copy from. |
auto boost::beast::basic_multi_buffer< Allocator >::operator= | ( | basic_multi_buffer< OtherAlloc > const & | other | ) | -> basic_multi_buffer& |
auto boost::beast::basic_multi_buffer< Allocator >::prepare | ( | size_type | n | ) |
Get a list of buffers that represents the output sequence, with the given size.
|
inline |
Returns the size of the input sequence.
|
friend |