ゴミ箱
|
#include <flat_buffer.hpp>
Public Types | |
using | allocator_type = Allocator |
The type of allocator used. More... | |
using | const_buffers_type = boost::asio::mutable_buffers_1 |
The type used to represent the input sequence as a list of buffers. More... | |
using | mutable_buffers_type = boost::asio::mutable_buffers_1 |
The type used to represent the output sequence as a list of buffers. More... | |
Public Member Functions | |
~basic_flat_buffer () | |
Destructor. More... | |
basic_flat_buffer () | |
basic_flat_buffer (std::size_t limit) | |
basic_flat_buffer (Allocator const &alloc) | |
basic_flat_buffer (std::size_t limit, Allocator const &alloc) | |
basic_flat_buffer (basic_flat_buffer &&other) | |
basic_flat_buffer (basic_flat_buffer &&other, Allocator const &alloc) | |
basic_flat_buffer (basic_flat_buffer const &other) | |
basic_flat_buffer (basic_flat_buffer const &other, Allocator const &alloc) | |
template<class OtherAlloc > | |
basic_flat_buffer (basic_flat_buffer< OtherAlloc > const &other) | |
template<class OtherAlloc > | |
basic_flat_buffer (basic_flat_buffer< OtherAlloc > const &other, Allocator const &alloc) | |
basic_flat_buffer & | operator= (basic_flat_buffer &&other) |
basic_flat_buffer & | operator= (basic_flat_buffer const &other) |
template<class OtherAlloc > | |
basic_flat_buffer & | operator= (basic_flat_buffer< OtherAlloc > const &other) |
allocator_type | get_allocator () const |
Returns a copy of the associated allocator. More... | |
std::size_t | size () const |
Returns the size of the input sequence. More... | |
std::size_t | max_size () const |
Return the maximum sum of the input and output sequence sizes. More... | |
std::size_t | capacity () const |
Return the maximum sum of input and output sizes that can be held without an allocation. More... | |
const_buffers_type | data () const |
Get a list of buffers that represent the input sequence. More... | |
mutable_buffers_type | prepare (std::size_t n) |
void | commit (std::size_t n) |
void | consume (std::size_t n) |
void | shrink_to_fit () |
template<class OtherAlloc > | |
auto | operator= (basic_flat_buffer< OtherAlloc > const &other) -> basic_flat_buffer & |
Friends | |
template<class OtherAlloc > | |
class | basic_flat_buffer |
template<class Alloc > | |
void | swap (basic_flat_buffer< Alloc > &lhs, basic_flat_buffer< Alloc > &rhs) |
Exchange two flat buffers. More... | |
A linear dynamic buffer.
Objects of this type meet the requirements of DynamicBuffer and offer additional invariants:
std::length_error
.Upon construction, a maximum size for the buffer may be specified. If this limit is exceeded, the std::length_error
exception will be thrown.
using boost::beast::basic_flat_buffer< Allocator >::allocator_type = Allocator |
The type of allocator used.
using boost::beast::basic_flat_buffer< Allocator >::const_buffers_type = boost::asio::mutable_buffers_1 |
The type used to represent the input sequence as a list of buffers.
using boost::beast::basic_flat_buffer< Allocator >::mutable_buffers_type = boost::asio::mutable_buffers_1 |
The type used to represent the output sequence as a list of buffers.
boost::beast::basic_flat_buffer< Allocator >::~basic_flat_buffer | ( | ) |
Destructor.
boost::beast::basic_flat_buffer< Allocator >::basic_flat_buffer | ( | ) |
Constructor
Upon construction, capacity will be zero.
|
explicit |
|
explicit |
Constructor
Upon construction, capacity will be zero.
alloc | The allocator to construct with. |
boost::beast::basic_flat_buffer< Allocator >::basic_flat_buffer | ( | std::size_t | limit, |
Allocator const & | alloc | ||
) |
Constructor
Upon construction, capacity will be zero.
limit | The setting for max_size. |
alloc | The allocator to use. |
boost::beast::basic_flat_buffer< Allocator >::basic_flat_buffer | ( | basic_flat_buffer< Allocator > && | other | ) |
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_flat_buffer< Allocator >::basic_flat_buffer | ( | basic_flat_buffer< Allocator > && | other, |
Allocator const & | alloc | ||
) |
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_flat_buffer< Allocator >::basic_flat_buffer | ( | basic_flat_buffer< Allocator > const & | other | ) |
Constructor
other | The object to copy from. |
boost::beast::basic_flat_buffer< Allocator >::basic_flat_buffer | ( | basic_flat_buffer< Allocator > const & | other, |
Allocator const & | alloc | ||
) |
Constructor
other | The object to copy from. |
alloc | The allocator to use. |
boost::beast::basic_flat_buffer< Allocator >::basic_flat_buffer | ( | basic_flat_buffer< OtherAlloc > const & | other | ) |
Constructor
other | The object to copy from. |
boost::beast::basic_flat_buffer< Allocator >::basic_flat_buffer | ( | basic_flat_buffer< OtherAlloc > const & | other, |
Allocator const & | alloc | ||
) |
Constructor
other | The object to copy from. |
alloc | The allocator to use. |
|
inline |
Return the maximum sum of input and output sizes that can be held without an allocation.
|
inline |
Move bytes from the output sequence to the input sequence.
n | The number of bytes to move. If this is larger than the number of bytes in the output sequences, then the entire output sequences is moved. |
void boost::beast::basic_flat_buffer< Allocator >::consume | ( | std::size_t | n | ) |
|
inline |
Get a list of buffers that represent the input sequence.
|
inline |
Returns a copy of the associated allocator.
|
inline |
Return the maximum sum of the input and output sequence sizes.
auto boost::beast::basic_flat_buffer< Allocator >::operator= | ( | basic_flat_buffer< Allocator > && | other | ) |
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_flat_buffer< Allocator >::operator= | ( | basic_flat_buffer< Allocator > const & | other | ) |
Assignment
After the copy, *this
will have an empty output sequence.
other | The object to copy from. |
basic_flat_buffer& boost::beast::basic_flat_buffer< Allocator >::operator= | ( | basic_flat_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_flat_buffer< Allocator >::operator= | ( | basic_flat_buffer< OtherAlloc > const & | other | ) | -> basic_flat_buffer& |
auto boost::beast::basic_flat_buffer< Allocator >::prepare | ( | std::size_t | n | ) |
Get a list of buffers that represent the output sequence, with the given size.
std::length_error | if size() + n exceeds max_size() . |
void boost::beast::basic_flat_buffer< Allocator >::shrink_to_fit | ( | ) |
|
inline |
Returns the size of the input sequence.
|
friend |
Exchange two flat buffers.