10 #ifndef BOOST_BEAST_BUFFERS_ADAPTER_HPP 11 #define BOOST_BEAST_BUFFERS_ADAPTER_HPP 15 #include <boost/asio/buffer.hpp> 16 #include <type_traits> 35 template<
class MutableBufferSequence>
39 "MutableBufferSequence requirements not met");
41 using iter_type =
typename MutableBufferSequence::const_iterator;
47 std::size_t max_size_;
48 std::size_t in_pos_ = 0;
49 std::size_t in_size_ = 0;
50 std::size_t out_pos_ = 0;
51 std::size_t out_end_ = 0;
53 template<
class Deduced>
55 std::size_t nbegin, std::size_t nout,
57 : bs_(std::forward<Deduced>(other).bs_)
58 , begin_(std::next(bs_.begin(), nbegin))
59 , out_(std::next(bs_.begin(), nout))
60 , end_(std::next(bs_.begin(), nend))
61 , max_size_(other.max_size_)
62 , in_pos_(other.in_pos_)
63 , in_size_(other.in_size_)
64 , out_pos_(other.out_pos_)
65 , out_end_(other.out_end_)
70 #if BOOST_BEAST_DOXYGEN 71 using const_buffers_type = implementation_defined;
78 class const_buffers_type;
void consume(std::size_t n)
Remove bytes from the input sequence.
Definition: buffers_adapter.ipp:474
std::size_t max_size() const
Returns the largest size output sequence possible.
Definition: buffers_adapter.hpp:107
Definition: async_result.hpp:20
mutable_buffers_type prepare(std::size_t n)
Definition: buffers_adapter.ipp:387
detail::buffers_helper< ConstBufferSequence > buffers(ConstBufferSequence const &b)
Definition: ostream.hpp:50
Definition: buffers_adapter.hpp:36
std::size_t size() const
Get the size of the input sequence.
Definition: buffers_adapter.hpp:114
Definition: buffers_adapter.ipp:167
void commit(std::size_t n)
Definition: buffers_adapter.ipp:427
std::size_t capacity() const
Returns the maximum sum of the sizes of the input sequence and output sequence the buffer can hold wi...
Definition: buffers_adapter.hpp:121
const_buffers_type data() const
Definition: buffers_adapter.ipp:466
buffers_adapter & operator=(buffers_adapter &&other)
Move assignment.
Definition: buffers_adapter.ipp:330
Definition: type_traits.hpp:96
BufferSequence< boost::asio::mutable_buffer > MutableBufferSequence
Definition: type_traits.hpp:282