From 69a03d7b6bf88cc5c13f2d446ba17a627810602c Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 21 Sep 2016 18:17:59 +1000 Subject: [PATCH] Rename DynamicBufferSequence to DynamicBuffer, is_dynamic_buffer_sequence to is_dynamic_buffer. --- asio/include/asio/buffer.hpp | 11 +- .../asio/detail/is_buffer_sequence.hpp | 6 +- asio/include/asio/impl/read.hpp | 90 +++--- asio/include/asio/impl/read_until.hpp | 256 ++++++++--------- asio/include/asio/impl/write.hpp | 90 +++--- asio/include/asio/read.hpp | 36 +-- asio/include/asio/read_until.hpp | 56 ++-- asio/include/asio/write.hpp | 36 +-- asio/src/doc/quickref.xml | 2 +- asio/src/doc/reference.qbk | 272 +++++++++--------- asio/src/doc/reference.xsl | 2 +- ...icBufferSequence.qbk => DynamicBuffer.qbk} | 35 ++- 12 files changed, 444 insertions(+), 448 deletions(-) rename asio/src/doc/requirements/{DynamicBufferSequence.qbk => DynamicBuffer.qbk} (67%) diff --git a/asio/include/asio/buffer.hpp b/asio/include/asio/buffer.hpp index 498877ae..3121d97b 100644 --- a/asio/include/asio/buffer.hpp +++ b/asio/include/asio/buffer.hpp @@ -369,14 +369,13 @@ struct is_const_buffer_sequence { }; -/// Trait to determine whether a type satisfies the DynamicBufferSequence -/// requirements. +/// Trait to determine whether a type satisfies the DynamicBuffer requirements. template -struct is_dynamic_buffer_sequence +struct is_dynamic_buffer #if defined(GENERATING_DOCUMENTATION) : integral_constant #else // defined(GENERATING_DOCUMENTATION) - : asio::detail::is_dynamic_buffer_sequence + : asio::detail::is_dynamic_buffer #endif // defined(GENERATING_DOCUMENTATION) { }; @@ -1477,7 +1476,7 @@ inline ASIO_CONST_BUFFER buffer( /*@}*/ -/// Adapt a basic_string to the DynamicBufferSequence requirements. +/// Adapt a basic_string to the DynamicBuffer requirements. /** * Requires that sizeof(Elem) == 1. */ @@ -1628,7 +1627,7 @@ private: const std::size_t max_size_; }; -/// Adapt a vector to the DynamicBufferSequence requirements. +/// Adapt a vector to the DynamicBuffer requirements. /** * Requires that sizeof(Elem) == 1. */ diff --git a/asio/include/asio/detail/is_buffer_sequence.hpp b/asio/include/asio/detail/is_buffer_sequence.hpp index 89a0e211..95f29c50 100644 --- a/asio/include/asio/detail/is_buffer_sequence.hpp +++ b/asio/include/asio/detail/is_buffer_sequence.hpp @@ -209,7 +209,7 @@ struct is_buffer_sequence }; template -struct is_dynamic_buffer_sequence_class +struct is_dynamic_buffer_class : integral_constant(0)) != 1 && sizeof(max_size_memfn_helper(0)) != 1 && @@ -224,9 +224,9 @@ struct is_dynamic_buffer_sequence_class }; template -struct is_dynamic_buffer_sequence +struct is_dynamic_buffer : conditional::value, - is_dynamic_buffer_sequence_class, + is_dynamic_buffer_class, false_type>::type { }; diff --git a/asio/include/asio/impl/read.hpp b/asio/include/asio/impl/read.hpp index 0af4801d..385a552e 100644 --- a/asio/include/asio/impl/read.hpp +++ b/asio/include/asio/impl/read.hpp @@ -107,17 +107,17 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, return bytes_transferred; } -template std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { - typename decay::type b( - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers)); + typename decay::type b( + ASIO_MOVE_CAST(DynamicBuffer)(buffers)); ec = asio::error_code(); std::size_t total_transferred = 0; @@ -140,44 +140,44 @@ std::size_t read(SyncReadStream& s, return total_transferred; } -template +template inline std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { asio::error_code ec; std::size_t bytes_transferred = read(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), transfer_all(), ec); + ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec); asio::detail::throw_error(ec, "read"); return bytes_transferred; } -template +template inline std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { - return read(s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + return read(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec); } -template inline std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { asio::error_code ec; std::size_t bytes_transferred = read(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + ASIO_MOVE_CAST(DynamicBuffer)(buffers), completion_condition, ec); asio::detail::throw_error(ec, "read"); return bytes_transferred; @@ -456,7 +456,7 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, namespace detail { - template class read_dynbuf_op : detail::base_from_completion_cond @@ -490,7 +490,7 @@ namespace detail read_dynbuf_op(read_dynbuf_op&& other) : detail::base_from_completion_cond(other), stream_(other.stream_), - buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)), + buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)), start_(other.start_), total_transferred_(other.total_transferred_), handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_)) @@ -534,36 +534,36 @@ namespace detail //private: AsyncReadStream& stream_; - DynamicBufferSequence buffers_; + DynamicBuffer buffers_; int start_; std::size_t total_transferred_; ReadHandler handler_; }; - template inline void* asio_handler_allocate(std::size_t size, - read_dynbuf_op* this_handler) { return asio_handler_alloc_helpers::allocate( size, this_handler->handler_); } - template inline void asio_handler_deallocate(void* pointer, std::size_t size, - read_dynbuf_op* this_handler) { asio_handler_alloc_helpers::deallocate( pointer, size, this_handler->handler_); } - template inline bool asio_handler_is_continuation( - read_dynbuf_op* this_handler) { return this_handler->start_ == 0 ? true @@ -572,10 +572,10 @@ namespace detail } template inline void asio_handler_invoke(Function& function, - read_dynbuf_op* this_handler) { asio_handler_invoke_helpers::invoke( @@ -583,10 +583,10 @@ namespace detail } template inline void asio_handler_invoke(const Function& function, - read_dynbuf_op* this_handler) { asio_handler_invoke_helpers::invoke( @@ -596,36 +596,36 @@ namespace detail #if !defined(GENERATING_DOCUMENTATION) -template struct associated_allocator< detail::read_dynbuf_op, + DynamicBuffer, CompletionCondition, ReadHandler>, Allocator> { typedef typename associated_allocator::type type; static type get( const detail::read_dynbuf_op& h, + DynamicBuffer, CompletionCondition, ReadHandler>& h, const Allocator& a = Allocator()) ASIO_NOEXCEPT { return associated_allocator::get(h.handler_, a); } }; -template struct associated_executor< detail::read_dynbuf_op, + DynamicBuffer, CompletionCondition, ReadHandler>, Executor> { typedef typename associated_executor::type type; static type get( const detail::read_dynbuf_op& h, + DynamicBuffer, CompletionCondition, ReadHandler>& h, const Executor& ex = Executor()) ASIO_NOEXCEPT { return associated_executor::get(h.handler_, ex); @@ -635,31 +635,31 @@ struct associated_executor< #endif // !defined(GENERATING_DOCUMENTATION) template + typename DynamicBuffer, typename ReadHandler> inline ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, ASIO_MOVE_ARG(ReadHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { return async_read(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ASIO_MOVE_CAST(ReadHandler)(handler)); } -template inline ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, ASIO_MOVE_ARG(ReadHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { // If you get an error on the following line it means that your handler does @@ -670,10 +670,10 @@ async_read(AsyncReadStream& s, void (asio::error_code, std::size_t)> init(handler); detail::read_dynbuf_op::type, + typename decay::type, CompletionCondition, ASIO_HANDLER_TYPE( ReadHandler, void (asio::error_code, std::size_t))>( - s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), completion_condition, init.completion_handler)( asio::error_code(), 0, 1); diff --git a/asio/include/asio/impl/read_until.hpp b/asio/include/asio/impl/read_until.hpp index 9ad713a5..3ac214de 100644 --- a/asio/include/asio/impl/read_until.hpp +++ b/asio/include/asio/impl/read_until.hpp @@ -35,30 +35,30 @@ namespace asio { -template +template inline std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, char delim) + ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim) { asio::error_code ec; std::size_t bytes_transferred = read_until(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), delim, ec); + ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec); asio::detail::throw_error(ec, "read_until"); return bytes_transferred; } -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim, asio::error_code& ec) { - typename decay::type b( - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers)); + typename decay::type b( + ASIO_MOVE_CAST(DynamicBuffer)(buffers)); std::size_t search_position = 0; for (;;) { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type buffers_type; + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = b.data(); iterator begin = iterator::begin(data_buffers); @@ -96,14 +96,14 @@ std::size_t read_until(SyncReadStream& s, } } -template +template inline std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const std::string& delim) { asio::error_code ec; std::size_t bytes_transferred = read_until(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), delim, ec); + ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec); asio::detail::throw_error(ec, "read_until"); return bytes_transferred; } @@ -143,19 +143,19 @@ namespace detail } } // namespace detail -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const std::string& delim, asio::error_code& ec) { - typename decay::type b( - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers)); + typename decay::type b( + ASIO_MOVE_CAST(DynamicBuffer)(buffers)); std::size_t search_position = 0; for (;;) { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type buffers_type; + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = b.data(); iterator begin = iterator::begin(data_buffers); @@ -205,31 +205,31 @@ std::size_t read_until(SyncReadStream& s, #if !defined(ASIO_NO_EXTENSIONS) #if defined(ASIO_HAS_BOOST_REGEX) -template +template inline std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const boost::regex& expr) { asio::error_code ec; std::size_t bytes_transferred = read_until(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), expr, ec); + ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec); asio::detail::throw_error(ec, "read_until"); return bytes_transferred; } -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const boost::regex& expr, asio::error_code& ec) { - typename decay::type b( - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers)); + typename decay::type b( + ASIO_MOVE_CAST(DynamicBuffer)(buffers)); std::size_t search_position = 0; for (;;) { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type buffers_type; + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = b.data(); iterator begin = iterator::begin(data_buffers); @@ -279,35 +279,35 @@ std::size_t read_until(SyncReadStream& s, #endif // defined(ASIO_HAS_BOOST_REGEX) template + typename DynamicBuffer, typename MatchCondition> inline std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, MatchCondition match_condition, typename enable_if::value>::type*) { asio::error_code ec; std::size_t bytes_transferred = read_until(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + ASIO_MOVE_CAST(DynamicBuffer)(buffers), match_condition, ec); asio::detail::throw_error(ec, "read_until"); return bytes_transferred; } template + typename DynamicBuffer, typename MatchCondition> std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, MatchCondition match_condition, asio::error_code& ec, typename enable_if::value>::type*) { - typename decay::type b( - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers)); + typename decay::type b( + ASIO_MOVE_CAST(DynamicBuffer)(buffers)); std::size_t search_position = 0; for (;;) { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type buffers_type; + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = b.data(); iterator begin = iterator::begin(data_buffers); @@ -424,7 +424,7 @@ inline std::size_t read_until(SyncReadStream& s, namespace detail { template + typename DynamicBuffer, typename ReadHandler> class read_until_delim_op { public: @@ -454,7 +454,7 @@ namespace detail read_until_delim_op(read_until_delim_op&& other) : stream_(other.stream_), - buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)), + buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)), delim_(other.delim_), start_(other.start_), search_position_(other.search_position_), @@ -475,7 +475,7 @@ namespace detail { { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = buffers_.data(); @@ -539,7 +539,7 @@ namespace detail //private: AsyncReadStream& stream_; - DynamicBufferSequence buffers_; + DynamicBuffer buffers_; char delim_; int start_; std::size_t search_position_; @@ -547,30 +547,30 @@ namespace detail }; template + typename DynamicBuffer, typename ReadHandler> inline void* asio_handler_allocate(std::size_t size, read_until_delim_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { return asio_handler_alloc_helpers::allocate( size, this_handler->handler_); } template + typename DynamicBuffer, typename ReadHandler> inline void asio_handler_deallocate(void* pointer, std::size_t size, read_until_delim_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { asio_handler_alloc_helpers::deallocate( pointer, size, this_handler->handler_); } template + typename DynamicBuffer, typename ReadHandler> inline bool asio_handler_is_continuation( read_until_delim_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { return this_handler->start_ == 0 ? true : asio_handler_cont_helpers::is_continuation( @@ -578,20 +578,20 @@ namespace detail } template + typename DynamicBuffer, typename ReadHandler> inline void asio_handler_invoke(Function& function, read_until_delim_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { asio_handler_invoke_helpers::invoke( function, this_handler->handler_); } template + typename DynamicBuffer, typename ReadHandler> inline void asio_handler_invoke(const Function& function, read_until_delim_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { asio_handler_invoke_helpers::invoke( function, this_handler->handler_); @@ -600,36 +600,36 @@ namespace detail #if !defined(GENERATING_DOCUMENTATION) -template struct associated_allocator< detail::read_until_delim_op, + DynamicBuffer, ReadHandler>, Allocator> { typedef typename associated_allocator::type type; static type get( const detail::read_until_delim_op& h, + DynamicBuffer, ReadHandler>& h, const Allocator& a = Allocator()) ASIO_NOEXCEPT { return associated_allocator::get(h.handler_, a); } }; -template struct associated_executor< detail::read_until_delim_op, + DynamicBuffer, ReadHandler>, Executor> { typedef typename associated_executor::type type; static type get( const detail::read_until_delim_op& h, + DynamicBuffer, ReadHandler>& h, const Executor& ex = Executor()) ASIO_NOEXCEPT { return associated_executor::get(h.handler_, ex); @@ -639,11 +639,11 @@ struct associated_executor< #endif // !defined(GENERATING_DOCUMENTATION) template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim, ASIO_MOVE_ARG(ReadHandler) handler) { // If you get an error on the following line it means that your handler does @@ -654,10 +654,10 @@ async_read_until(AsyncReadStream& s, void (asio::error_code, std::size_t)> init(handler); detail::read_until_delim_op::type, + typename decay::type, ASIO_HANDLER_TYPE(ReadHandler, void (asio::error_code, std::size_t))>( - s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, init.completion_handler)(asio::error_code(), 0, 1); return init.result.get(); @@ -666,7 +666,7 @@ async_read_until(AsyncReadStream& s, namespace detail { template + typename DynamicBuffer, typename ReadHandler> class read_until_delim_string_op { public: @@ -696,7 +696,7 @@ namespace detail read_until_delim_string_op(read_until_delim_string_op&& other) : stream_(other.stream_), - buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)), + buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)), delim_(ASIO_MOVE_CAST(std::string)(other.delim_)), start_(other.start_), search_position_(other.search_position_), @@ -717,7 +717,7 @@ namespace detail { { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = buffers_.data(); @@ -792,7 +792,7 @@ namespace detail //private: AsyncReadStream& stream_; - DynamicBufferSequence buffers_; + DynamicBuffer buffers_; std::string delim_; int start_; std::size_t search_position_; @@ -800,30 +800,30 @@ namespace detail }; template + typename DynamicBuffer, typename ReadHandler> inline void* asio_handler_allocate(std::size_t size, read_until_delim_string_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { return asio_handler_alloc_helpers::allocate( size, this_handler->handler_); } template + typename DynamicBuffer, typename ReadHandler> inline void asio_handler_deallocate(void* pointer, std::size_t size, read_until_delim_string_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { asio_handler_alloc_helpers::deallocate( pointer, size, this_handler->handler_); } template + typename DynamicBuffer, typename ReadHandler> inline bool asio_handler_is_continuation( read_until_delim_string_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { return this_handler->start_ == 0 ? true : asio_handler_cont_helpers::is_continuation( @@ -831,20 +831,20 @@ namespace detail } template + typename DynamicBuffer, typename ReadHandler> inline void asio_handler_invoke(Function& function, read_until_delim_string_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { asio_handler_invoke_helpers::invoke( function, this_handler->handler_); } template + typename DynamicBuffer, typename ReadHandler> inline void asio_handler_invoke(const Function& function, read_until_delim_string_op* this_handler) + DynamicBuffer, ReadHandler>* this_handler) { asio_handler_invoke_helpers::invoke( function, this_handler->handler_); @@ -853,36 +853,36 @@ namespace detail #if !defined(GENERATING_DOCUMENTATION) -template struct associated_allocator< detail::read_until_delim_string_op, + DynamicBuffer, ReadHandler>, Allocator> { typedef typename associated_allocator::type type; static type get( const detail::read_until_delim_string_op& h, + DynamicBuffer, ReadHandler>& h, const Allocator& a = Allocator()) ASIO_NOEXCEPT { return associated_allocator::get(h.handler_, a); } }; -template struct associated_executor< detail::read_until_delim_string_op, + DynamicBuffer, ReadHandler>, Executor> { typedef typename associated_executor::type type; static type get( const detail::read_until_delim_string_op& h, + DynamicBuffer, ReadHandler>& h, const Executor& ex = Executor()) ASIO_NOEXCEPT { return associated_executor::get(h.handler_, ex); @@ -892,11 +892,11 @@ struct associated_executor< #endif // !defined(GENERATING_DOCUMENTATION) template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const std::string& delim, ASIO_MOVE_ARG(ReadHandler) handler) { // If you get an error on the following line it means that your handler does @@ -907,10 +907,10 @@ async_read_until(AsyncReadStream& s, void (asio::error_code, std::size_t)> init(handler); detail::read_until_delim_string_op::type, + typename decay::type, ASIO_HANDLER_TYPE(ReadHandler, void (asio::error_code, std::size_t))>( - s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, init.completion_handler)(asio::error_code(), 0, 1); return init.result.get(); @@ -921,7 +921,7 @@ async_read_until(AsyncReadStream& s, namespace detail { - template class read_until_expr_op { @@ -952,7 +952,7 @@ namespace detail read_until_expr_op(read_until_expr_op&& other) : stream_(other.stream_), - buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)), + buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)), expr_(other.expr_), start_(other.start_), search_position_(other.search_position_), @@ -973,7 +973,7 @@ namespace detail { { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = buffers_.data(); @@ -1051,38 +1051,38 @@ namespace detail //private: AsyncReadStream& stream_; - DynamicBufferSequence buffers_; + DynamicBuffer buffers_; RegEx expr_; int start_; std::size_t search_position_; ReadHandler handler_; }; - template inline void* asio_handler_allocate(std::size_t size, read_until_expr_op* this_handler) + DynamicBuffer, RegEx, ReadHandler>* this_handler) { return asio_handler_alloc_helpers::allocate( size, this_handler->handler_); } - template inline void asio_handler_deallocate(void* pointer, std::size_t size, read_until_expr_op* this_handler) + DynamicBuffer, RegEx, ReadHandler>* this_handler) { asio_handler_alloc_helpers::deallocate( pointer, size, this_handler->handler_); } - template inline bool asio_handler_is_continuation( read_until_expr_op* this_handler) + DynamicBuffer, RegEx, ReadHandler>* this_handler) { return this_handler->start_ == 0 ? true : asio_handler_cont_helpers::is_continuation( @@ -1090,20 +1090,20 @@ namespace detail } template + typename DynamicBuffer, typename RegEx, typename ReadHandler> inline void asio_handler_invoke(Function& function, read_until_expr_op* this_handler) + DynamicBuffer, RegEx, ReadHandler>* this_handler) { asio_handler_invoke_helpers::invoke( function, this_handler->handler_); } template + typename DynamicBuffer, typename RegEx, typename ReadHandler> inline void asio_handler_invoke(const Function& function, read_until_expr_op* this_handler) + DynamicBuffer, RegEx, ReadHandler>* this_handler) { asio_handler_invoke_helpers::invoke( function, this_handler->handler_); @@ -1112,36 +1112,36 @@ namespace detail #if !defined(GENERATING_DOCUMENTATION) -template struct associated_allocator< detail::read_until_expr_op, + DynamicBuffer, RegEx, ReadHandler>, Allocator> { typedef typename associated_allocator::type type; static type get( const detail::read_until_expr_op& h, + DynamicBuffer, RegEx, ReadHandler>& h, const Allocator& a = Allocator()) ASIO_NOEXCEPT { return associated_allocator::get(h.handler_, a); } }; -template struct associated_executor< detail::read_until_expr_op, + DynamicBuffer, RegEx, ReadHandler>, Executor> { typedef typename associated_executor::type type; static type get( const detail::read_until_expr_op& h, + DynamicBuffer, RegEx, ReadHandler>& h, const Executor& ex = Executor()) ASIO_NOEXCEPT { return associated_executor::get(h.handler_, ex); @@ -1151,11 +1151,11 @@ struct associated_executor< #endif // !defined(GENERATING_DOCUMENTATION) template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const boost::regex& expr, ASIO_MOVE_ARG(ReadHandler) handler) { @@ -1167,10 +1167,10 @@ async_read_until(AsyncReadStream& s, void (asio::error_code, std::size_t)> init(handler); detail::read_until_expr_op::type, + typename decay::type, boost::regex, ASIO_HANDLER_TYPE(ReadHandler, void (asio::error_code, std::size_t))>( - s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, init.completion_handler)(asio::error_code(), 0, 1); return init.result.get(); @@ -1180,7 +1180,7 @@ async_read_until(AsyncReadStream& s, namespace detail { - template class read_until_match_op { @@ -1211,7 +1211,7 @@ namespace detail read_until_match_op(read_until_match_op&& other) : stream_(other.stream_), - buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)), + buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)), match_condition_(other.match_condition_), start_(other.start_), search_position_(other.search_position_), @@ -1232,7 +1232,7 @@ namespace detail { { // Determine the range of the data to be searched. - typedef typename DynamicBufferSequence::const_buffers_type + typedef typename DynamicBuffer::const_buffers_type buffers_type; typedef buffers_iterator iterator; buffers_type data_buffers = buffers_.data(); @@ -1306,37 +1306,37 @@ namespace detail //private: AsyncReadStream& stream_; - DynamicBufferSequence buffers_; + DynamicBuffer buffers_; MatchCondition match_condition_; int start_; std::size_t search_position_; ReadHandler handler_; }; - template inline void* asio_handler_allocate(std::size_t size, - read_until_match_op* this_handler) { return asio_handler_alloc_helpers::allocate( size, this_handler->handler_); } - template inline void asio_handler_deallocate(void* pointer, std::size_t size, - read_until_match_op* this_handler) { asio_handler_alloc_helpers::deallocate( pointer, size, this_handler->handler_); } - template inline bool asio_handler_is_continuation( - read_until_match_op* this_handler) { return this_handler->start_ == 0 ? true @@ -1345,10 +1345,10 @@ namespace detail } template inline void asio_handler_invoke(Function& function, - read_until_match_op* this_handler) { asio_handler_invoke_helpers::invoke( @@ -1356,10 +1356,10 @@ namespace detail } template inline void asio_handler_invoke(const Function& function, - read_until_match_op* this_handler) { asio_handler_invoke_helpers::invoke( @@ -1369,36 +1369,36 @@ namespace detail #if !defined(GENERATING_DOCUMENTATION) -template struct associated_allocator< detail::read_until_match_op, + DynamicBuffer, MatchCondition, ReadHandler>, Allocator> { typedef typename associated_allocator::type type; static type get( const detail::read_until_match_op& h, + DynamicBuffer, MatchCondition, ReadHandler>& h, const Allocator& a = Allocator()) ASIO_NOEXCEPT { return associated_allocator::get(h.handler_, a); } }; -template struct associated_executor< detail::read_until_match_op, + DynamicBuffer, MatchCondition, ReadHandler>, Executor> { typedef typename associated_executor::type type; static type get( const detail::read_until_match_op& h, + DynamicBuffer, MatchCondition, ReadHandler>& h, const Executor& ex = Executor()) ASIO_NOEXCEPT { return associated_executor::get(h.handler_, ex); @@ -1407,12 +1407,12 @@ struct associated_executor< #endif // !defined(GENERATING_DOCUMENTATION) -template ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler, typename enable_if::value>::type*) { @@ -1424,10 +1424,10 @@ async_read_until(AsyncReadStream& s, void (asio::error_code, std::size_t)> init(handler); detail::read_until_match_op::type, + typename decay::type, MatchCondition, ASIO_HANDLER_TYPE(ReadHandler, void (asio::error_code, std::size_t))>( - s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), match_condition, init.completion_handler)( asio::error_code(), 0, 1); diff --git a/asio/include/asio/impl/write.hpp b/asio/include/asio/impl/write.hpp index 1fa721a7..8250aa30 100644 --- a/asio/include/asio/impl/write.hpp +++ b/asio/include/asio/impl/write.hpp @@ -105,62 +105,62 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, return bytes_transferred; } -template std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { - typename decay::type b( - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers)); + typename decay::type b( + ASIO_MOVE_CAST(DynamicBuffer)(buffers)); std::size_t bytes_transferred = write(s, b.data(), completion_condition, ec); b.consume(bytes_transferred); return bytes_transferred; } -template +template inline std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { asio::error_code ec; std::size_t bytes_transferred = write(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec); asio::detail::throw_error(ec, "write"); return bytes_transferred; } -template +template inline std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { - return write(s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + return write(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec); } -template inline std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { asio::error_code ec; std::size_t bytes_transferred = write(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + ASIO_MOVE_CAST(DynamicBuffer)(buffers), completion_condition, ec); asio::detail::throw_error(ec, "write"); return bytes_transferred; @@ -440,7 +440,7 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, namespace detail { - template class write_dynbuf_op { @@ -468,7 +468,7 @@ namespace detail write_dynbuf_op(write_dynbuf_op&& other) : stream_(other.stream_), - buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)), + buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)), completion_condition_( ASIO_MOVE_CAST(CompletionCondition)( other.completion_condition_)), @@ -493,35 +493,35 @@ namespace detail //private: AsyncWriteStream& stream_; - DynamicBufferSequence buffers_; + DynamicBuffer buffers_; CompletionCondition completion_condition_; WriteHandler handler_; }; - template inline void* asio_handler_allocate(std::size_t size, - write_dynbuf_op* this_handler) { return asio_handler_alloc_helpers::allocate( size, this_handler->handler_); } - template inline void asio_handler_deallocate(void* pointer, std::size_t size, - write_dynbuf_op* this_handler) { asio_handler_alloc_helpers::deallocate( pointer, size, this_handler->handler_); } - template inline bool asio_handler_is_continuation( - write_dynbuf_op* this_handler) { return asio_handler_cont_helpers::is_continuation( @@ -529,10 +529,10 @@ namespace detail } template inline void asio_handler_invoke(Function& function, - write_dynbuf_op* this_handler) { asio_handler_invoke_helpers::invoke( @@ -540,10 +540,10 @@ namespace detail } template inline void asio_handler_invoke(const Function& function, - write_dynbuf_op* this_handler) { asio_handler_invoke_helpers::invoke( @@ -553,36 +553,36 @@ namespace detail #if !defined(GENERATING_DOCUMENTATION) -template struct associated_allocator< detail::write_dynbuf_op, + DynamicBuffer, CompletionCondition, WriteHandler>, Allocator> { typedef typename associated_allocator::type type; static type get( const detail::write_dynbuf_op& h, + DynamicBuffer, CompletionCondition, WriteHandler>& h, const Allocator& a = Allocator()) ASIO_NOEXCEPT { return associated_allocator::get(h.handler_, a); } }; -template struct associated_executor< detail::write_dynbuf_op, + DynamicBuffer, CompletionCondition, WriteHandler>, Executor> { typedef typename associated_executor::type type; static type get( const detail::write_dynbuf_op& h, + DynamicBuffer, CompletionCondition, WriteHandler>& h, const Executor& ex = Executor()) ASIO_NOEXCEPT { return associated_executor::get(h.handler_, ex); @@ -592,31 +592,31 @@ struct associated_executor< #endif // !defined(GENERATING_DOCUMENTATION) template + typename DynamicBuffer, typename WriteHandler> inline ASIO_INITFN_RESULT_TYPE(WriteHandler, void (asio::error_code, std::size_t)) async_write(AsyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, ASIO_MOVE_ARG(WriteHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { return async_write(s, - ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ASIO_MOVE_CAST(WriteHandler)(handler)); } -template inline ASIO_INITFN_RESULT_TYPE(WriteHandler, void (asio::error_code, std::size_t)) async_write(AsyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, ASIO_MOVE_ARG(WriteHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type*) { // If you get an error on the following line it means that your handler does @@ -627,10 +627,10 @@ async_write(AsyncWriteStream& s, void (asio::error_code, std::size_t)> init(handler); detail::write_dynbuf_op::type, + typename decay::type, CompletionCondition, ASIO_HANDLER_TYPE( WriteHandler, void (asio::error_code, std::size_t))>( - s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), + s, ASIO_MOVE_CAST(DynamicBuffer)(buffers), completion_condition, init.completion_handler)( asio::error_code(), 0, 1); diff --git a/asio/include/asio/read.hpp b/asio/include/asio/read.hpp index caf2dbad..4839934d 100644 --- a/asio/include/asio/read.hpp +++ b/asio/include/asio/read.hpp @@ -250,11 +250,11 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, * s, buffers, * asio::transfer_all()); @endcode */ -template +template std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Attempt to read a certain amount of data from a stream before returning. @@ -283,12 +283,12 @@ std::size_t read(SyncReadStream& s, * s, buffers, * asio::transfer_all(), ec); @endcode */ -template +template std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Attempt to read a certain amount of data from a stream before returning. @@ -327,13 +327,13 @@ std::size_t read(SyncReadStream& s, * * @throws asio::system_error Thrown on failure. */ -template std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Attempt to read a certain amount of data from a stream before returning. @@ -373,13 +373,13 @@ std::size_t read(SyncReadStream& s, * @returns The number of bytes read. If an error occurs, returns the total * number of bytes successfully transferred prior to the error. */ -template std::size_t read(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); #if !defined(ASIO_NO_EXTENSIONS) @@ -732,14 +732,14 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, * handler); @endcode */ template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, ASIO_MOVE_ARG(ReadHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Start an asynchronous operation to read a certain amount of data from a @@ -800,16 +800,16 @@ async_read(AsyncReadStream& s, * the handler will be performed in a manner equivalent to using * asio::io_context::post(). */ -template ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, ASIO_MOVE_ARG(ReadHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); #if !defined(ASIO_NO_EXTENSIONS) diff --git a/asio/include/asio/read_until.hpp b/asio/include/asio/read_until.hpp index 8a88667a..c8454d80 100644 --- a/asio/include/asio/read_until.hpp +++ b/asio/include/asio/read_until.hpp @@ -125,9 +125,9 @@ struct is_match_condition * This data may be the start of a new line, to be extracted by a subsequent * @c read_until operation. */ -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, char delim); + ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -163,9 +163,9 @@ std::size_t read_until(SyncReadStream& s, * typically leave that data in the dynamic buffer sequence for a subsequent * read_until operation to examine. */ -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim, asio::error_code& ec); /// Read data into a dynamic buffer sequence until it contains a specified @@ -220,9 +220,9 @@ std::size_t read_until(SyncReadStream& s, * @c read_until operation. */ template + typename DynamicBuffer, typename Allocator> std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const std::basic_string, Allocator>& delim); /// Read data into a dynamic buffer sequence until it contains a specified @@ -260,9 +260,9 @@ std::size_t read_until(SyncReadStream& s, * read_until operation to examine. */ template + typename DynamicBuffer, typename Allocator> std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const std::basic_string, Allocator>& delim, asio::error_code& ec); @@ -324,9 +324,9 @@ std::size_t read_until(SyncReadStream& s, * This data may be the start of a new line, to be extracted by a subsequent * @c read_until operation. */ -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const boost::regex& expr); /// Read data into a dynamic buffer sequence until some part of the data it @@ -365,9 +365,9 @@ std::size_t read_until(SyncReadStream& s, * expression. An application will typically leave that data in the dynamic * buffer sequence for a subsequent read_until operation to examine. */ -template +template std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const boost::regex& expr, asio::error_code& ec); #endif // defined(ASIO_HAS_BOOST_REGEX) @@ -401,7 +401,7 @@ std::size_t read_until(SyncReadStream& s, * @code pair match_condition(iterator begin, iterator end); * @endcode * where @c iterator represents the type: - * @code buffers_iterator + * @code buffers_iterator * @endcode * The iterator parameters @c begin and @c end define the range of bytes to be * scanned to determine whether there is a match. The @c first member of the @@ -411,7 +411,7 @@ std::size_t read_until(SyncReadStream& s, * @c second member of the return value is true if a match has been found, false * otherwise. * - * @returns The number of bytes in the dynamic_buffer_sequence's get area that + * @returns The number of bytes in the dynamic_buffer's get area that * have been fully consumed by the match function. * * @throws asio::system_error Thrown on failure. @@ -476,9 +476,9 @@ std::size_t read_until(SyncReadStream& s, * @endcode */ template + typename DynamicBuffer, typename MatchCondition> std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, MatchCondition match_condition, typename enable_if::value>::type* = 0); @@ -509,7 +509,7 @@ std::size_t read_until(SyncReadStream& s, * @code pair match_condition(iterator begin, iterator end); * @endcode * where @c iterator represents the type: - * @code buffers_iterator + * @code buffers_iterator * @endcode * The iterator parameters @c begin and @c end define the range of bytes to be * scanned to determine whether there is a match. The @c first member of the @@ -536,9 +536,9 @@ std::size_t read_until(SyncReadStream& s, * function objects. */ template + typename DynamicBuffer, typename MatchCondition> std::size_t read_until(SyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, MatchCondition match_condition, asio::error_code& ec, typename enable_if::value>::type* = 0); @@ -1074,11 +1074,11 @@ std::size_t read_until(SyncReadStream& s, * @c async_read_until operation. */ template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim, ASIO_MOVE_ARG(ReadHandler) handler); /// Start an asynchronous operation to read data into a dynamic buffer sequence @@ -1164,11 +1164,11 @@ async_read_until(AsyncReadStream& s, * @c async_read_until operation. */ template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const std::string& delim, ASIO_MOVE_ARG(ReadHandler) handler); @@ -1262,11 +1262,11 @@ async_read_until(AsyncReadStream& s, * @c async_read_until operation. */ template + typename DynamicBuffer, typename ReadHandler> ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, const boost::regex& expr, ASIO_MOVE_ARG(ReadHandler) handler); @@ -1309,7 +1309,7 @@ async_read_until(AsyncReadStream& s, * @code pair match_condition(iterator begin, iterator end); * @endcode * where @c iterator represents the type: - * @code buffers_iterator + * @code buffers_iterator * @endcode * The iterator parameters @c begin and @c end define the range of bytes to be * scanned to determine whether there is a match. The @c first member of the @@ -1401,12 +1401,12 @@ async_read_until(AsyncReadStream& s, * asio::async_read_until(s, data, match_char('a'), handler); * @endcode */ -template ASIO_INITFN_RESULT_TYPE(ReadHandler, void (asio::error_code, std::size_t)) async_read_until(AsyncReadStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler, typename enable_if::value>::type* = 0); diff --git a/asio/include/asio/write.hpp b/asio/include/asio/write.hpp index f7cf6c63..00108620 100644 --- a/asio/include/asio/write.hpp +++ b/asio/include/asio/write.hpp @@ -249,11 +249,11 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, * s, buffers, * asio::transfer_all()); @endcode */ -template +template std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Write all of the supplied data to a stream before returning. @@ -283,12 +283,12 @@ std::size_t write(SyncWriteStream& s, * s, buffers, * asio::transfer_all(), ec); @endcode */ -template +template std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Write a certain amount of data to a stream before returning. @@ -327,13 +327,13 @@ std::size_t write(SyncWriteStream& s, * * @throws asio::system_error Thrown on failure. */ -template std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Write a certain amount of data to a stream before returning. @@ -373,13 +373,13 @@ std::size_t write(SyncWriteStream& s, * @returns The number of bytes written. If an error occurs, returns the total * number of bytes successfully transferred prior to the error. */ -template std::size_t write(SyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, asio::error_code& ec, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); #if !defined(ASIO_NO_EXTENSIONS) @@ -721,14 +721,14 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, * asio::io_context::post(). */ template + typename DynamicBuffer, typename WriteHandler> ASIO_INITFN_RESULT_TYPE(WriteHandler, void (asio::error_code, std::size_t)) async_write(AsyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, ASIO_MOVE_ARG(WriteHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); /// Start an asynchronous operation to write a certain amount of data to a @@ -788,16 +788,16 @@ async_write(AsyncWriteStream& s, * the handler will be performed in a manner equivalent to using * asio::io_context::post(). */ -template ASIO_INITFN_RESULT_TYPE(WriteHandler, void (asio::error_code, std::size_t)) async_write(AsyncWriteStream& s, - ASIO_MOVE_ARG(DynamicBufferSequence) buffers, + ASIO_MOVE_ARG(DynamicBuffer) buffers, CompletionCondition completion_condition, ASIO_MOVE_ARG(WriteHandler) handler, typename enable_if< - is_dynamic_buffer_sequence::value + is_dynamic_buffer::value >::type* = 0); #if !defined(ASIO_NO_EXTENSIONS) diff --git a/asio/src/doc/quickref.xml b/asio/src/doc/quickref.xml index 860efa29..7d2632a1 100644 --- a/asio/src/doc/quickref.xml +++ b/asio/src/doc/quickref.xml @@ -204,7 +204,7 @@ AsyncWriteStream CompletionCondition ConstBufferSequence - DynamicBufferSequence + DynamicBuffer MutableBufferSequence ReadHandler SyncRandomAccessReadDevice diff --git a/asio/src/doc/reference.qbk b/asio/src/doc/reference.qbk index b29e3384..42d4b41e 100644 --- a/asio/src/doc/reference.qbk +++ b/asio/src/doc/reference.qbk @@ -25,7 +25,7 @@ [include requirements/ConnectCondition.qbk] [include requirements/ConnectHandler.qbk] [include requirements/ConstBufferSequence.qbk] -[include requirements/DynamicBufferSequence.qbk] +[include requirements/DynamicBuffer.qbk] [include requirements/Endpoint.qbk] [include requirements/EndpointSequence.qbk] [include requirements/ExecutionContext.qbk] @@ -1374,26 +1374,26 @@ Start an asynchronous operation to read a certain amount of data from a stream. template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload3 async_read]``( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, ReadHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.async_read.overload3 more...]]`` template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload4 async_read]``( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, ReadHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.async_read.overload4 more...]]`` template< @@ -1601,13 +1601,13 @@ Start an asynchronous operation to read a certain amount of data from a stream. template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, ReadHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true: @@ -1674,15 +1674,15 @@ Start an asynchronous operation to read a certain amount of data from a stream. template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, ReadHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true: @@ -2273,45 +2273,45 @@ Start an asynchronous operation to read data into a dynamic buffer sequence, or template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload1 async_read_until]``( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, char delim, ReadHandler && handler); `` [''''»''' [link asio.reference.async_read_until.overload1 more...]]`` template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload2 async_read_until]``( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::string & delim, ReadHandler && handler); `` [''''»''' [link asio.reference.async_read_until.overload2 more...]]`` template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload3 async_read_until]``( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const boost::regex & expr, ReadHandler && handler); `` [''''»''' [link asio.reference.async_read_until.overload3 more...]]`` template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename MatchCondition, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload4 async_read_until]``( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, MatchCondition match_condition, ReadHandler && handler, typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0); @@ -2378,11 +2378,11 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, char delim, ReadHandler && handler); @@ -2482,11 +2482,11 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::string & delim, ReadHandler && handler); @@ -2586,11 +2586,11 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const boost::regex & expr, ReadHandler && handler); @@ -2692,12 +2692,12 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti template< typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename MatchCondition, typename ``[link asio.reference.ReadHandler ReadHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until( AsyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, MatchCondition match_condition, ReadHandler && handler, typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0); @@ -2729,7 +2729,7 @@ This operation is implemented in terms of zero or more calls to the stream's asy `` where `iterator` represents the type: `` - buffers_iterator + buffers_iterator `` The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]] @@ -3686,26 +3686,26 @@ Start an asynchronous operation to write a certain amount of data to a stream. template< typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.WriteHandler WriteHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload3 async_write]``( AsyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, WriteHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.async_write.overload3 more...]]`` template< typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``, typename ``[link asio.reference.WriteHandler WriteHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload4 async_write]``( AsyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, WriteHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.async_write.overload4 more...]]`` template< @@ -3900,13 +3900,13 @@ Start an asynchronous operation to write all of the supplied data to a stream. template< typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.WriteHandler WriteHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write( AsyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, WriteHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true: @@ -3959,15 +3959,15 @@ Start an asynchronous operation to write a certain amount of data to a stream. template< typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``, typename ``[link asio.reference.WriteHandler WriteHandler]``> ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write( AsyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, WriteHandler && handler, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true: @@ -49938,7 +49938,7 @@ Create a new dynamic buffer that represents the given vector. [section:dynamic_string_buffer dynamic_string_buffer] -Adapt a basic\_string to the DynamicBufferSequence requirements. +Adapt a basic\_string to the DynamicBuffer requirements. template< @@ -50437,7 +50437,7 @@ Get the size of the input sequence. [section:dynamic_vector_buffer dynamic_vector_buffer] -Adapt a vector to the DynamicBufferSequence requirements. +Adapt a vector to the DynamicBuffer requirements. template< @@ -80586,7 +80586,7 @@ Trait to determine whether a type satisfies the ConstBufferSequence requirements [section:is_dynamic_buffer_sequence is_dynamic_buffer_sequence] -Trait to determine whether a type satisfies the DynamicBufferSequence requirements. +Trait to determine whether a type satisfies the DynamicBuffer requirements. template< @@ -88554,44 +88554,44 @@ Attempt to read a certain amount of data from a stream before returning. template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read.overload5 read]``( SyncReadStream & s, - DynamicBufferSequence && buffers, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + DynamicBuffer && buffers, + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.read.overload5 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read.overload6 read]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.read.overload6 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t ``[link asio.reference.read.overload7 read]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.read.overload7 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t ``[link asio.reference.read.overload8 read]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.read.overload8 more...]]`` template< @@ -88952,11 +88952,11 @@ Attempt to read a certain amount of data from a stream before returning. template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read( SyncReadStream & s, - DynamicBufferSequence && buffers, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + DynamicBuffer && buffers, + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true: @@ -89023,12 +89023,12 @@ Attempt to read a certain amount of data from a stream before returning. template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true: @@ -89087,13 +89087,13 @@ Attempt to read a certain amount of data from a stream before returning. template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t read( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true: @@ -89160,14 +89160,14 @@ Attempt to read a certain amount of data from a stream before returning. template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t read( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true: @@ -90179,81 +90179,81 @@ Read data into a dynamic buffer sequence, or into a streambuf, until it contains template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read_until.overload1 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, char delim); `` [''''»''' [link asio.reference.read_until.overload1 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read_until.overload2 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, char delim, asio::error_code & ec); `` [''''»''' [link asio.reference.read_until.overload2 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename Allocator> std::size_t ``[link asio.reference.read_until.overload3 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::basic_string< char, std::char_traits< char >, Allocator > & delim); `` [''''»''' [link asio.reference.read_until.overload3 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename Allocator> std::size_t ``[link asio.reference.read_until.overload4 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::basic_string< char, std::char_traits< char >, Allocator > & delim, asio::error_code & ec); `` [''''»''' [link asio.reference.read_until.overload4 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read_until.overload5 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const boost::regex & expr); `` [''''»''' [link asio.reference.read_until.overload5 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read_until.overload6 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const boost::regex & expr, asio::error_code & ec); `` [''''»''' [link asio.reference.read_until.overload6 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename MatchCondition> std::size_t ``[link asio.reference.read_until.overload7 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, MatchCondition match_condition, typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0); `` [''''»''' [link asio.reference.read_until.overload7 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename MatchCondition> std::size_t ``[link asio.reference.read_until.overload8 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, MatchCondition match_condition, asio::error_code & ec, typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0); @@ -90341,19 +90341,19 @@ Read data into a dynamic buffer sequence, or into a streambuf, until it contains template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read_until.overload17 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::string & delim); `` [''''»''' [link asio.reference.read_until.overload17 more...]]`` template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.read_until.overload18 read_until]``( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::string & delim, asio::error_code & ec); `` [''''»''' [link asio.reference.read_until.overload18 more...]]`` @@ -90373,10 +90373,10 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, char delim); @@ -90468,10 +90468,10 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, char delim, asio::error_code & ec); @@ -90527,11 +90527,11 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename Allocator> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::basic_string< char, std::char_traits< char >, Allocator > & delim); @@ -90613,11 +90613,11 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename Allocator> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::basic_string< char, std::char_traits< char >, Allocator > & delim, asio::error_code & ec); @@ -90673,10 +90673,10 @@ Read data into a dynamic buffer sequence until some part of the data it contains template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const boost::regex & expr); @@ -90768,10 +90768,10 @@ Read data into a dynamic buffer sequence until some part of the data it contains template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const boost::regex & expr, asio::error_code & ec); @@ -90827,11 +90827,11 @@ Read data into a dynamic buffer sequence until a function object indicates a mat template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename MatchCondition> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, MatchCondition match_condition, typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0); @@ -90862,7 +90862,7 @@ This operation is implemented in terms of zero or more calls to the stream's rea `` where `iterator` represents the type: `` - buffers_iterator + buffers_iterator `` The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]] @@ -90960,11 +90960,11 @@ Read data into a dynamic buffer sequence until a function object indicates a mat template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename MatchCondition> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, MatchCondition match_condition, asio::error_code & ec, typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0); @@ -90996,7 +90996,7 @@ This operation is implemented in terms of zero or more calls to the stream's rea `` where `iterator` represents the type: `` - buffers_iterator + buffers_iterator `` The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]] @@ -91695,10 +91695,10 @@ The default implementation of the `is_match_condition` type trait evaluates to t template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::string & delim); @@ -91713,10 +91713,10 @@ The default implementation of the `is_match_condition` type trait evaluates to t template< typename ``[link asio.reference.SyncReadStream SyncReadStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t read_until( SyncReadStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, const std::string & delim, asio::error_code & ec); @@ -110565,44 +110565,44 @@ Write a certain amount of data to a stream before returning. template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.write.overload5 write]``( SyncWriteStream & s, - DynamicBufferSequence && buffers, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + DynamicBuffer && buffers, + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.write.overload5 more...]]`` template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t ``[link asio.reference.write.overload6 write]``( SyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.write.overload6 more...]]`` template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t ``[link asio.reference.write.overload7 write]``( SyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.write.overload7 more...]]`` template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t ``[link asio.reference.write.overload8 write]``( SyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); `` [''''»''' [link asio.reference.write.overload8 more...]]`` template< @@ -110963,11 +110963,11 @@ Write all of the supplied data to a stream before returning. template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t write( SyncWriteStream & s, - DynamicBufferSequence && buffers, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + DynamicBuffer && buffers, + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true: @@ -111034,12 +111034,12 @@ Write all of the supplied data to a stream before returning. template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``> + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``> std::size_t write( SyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true: @@ -111098,13 +111098,13 @@ Write a certain amount of data to a stream before returning. template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t write( SyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true: @@ -111171,14 +111171,14 @@ Write a certain amount of data to a stream before returning. template< typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``, - typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``, + typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``, typename ``[link asio.reference.CompletionCondition CompletionCondition]``> std::size_t write( SyncWriteStream & s, - DynamicBufferSequence && buffers, + DynamicBuffer && buffers, CompletionCondition completion_condition, asio::error_code & ec, - typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0); + typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0); This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true: @@ -112270,4 +112270,4 @@ The initiating function (async\_read\_some in the above example) suspends the cu [endsect] -[endsect] \ No newline at end of file +[endsect] diff --git a/asio/src/doc/reference.xsl b/asio/src/doc/reference.xsl index 6a2d32e2..e652cd9b 100644 --- a/asio/src/doc/reference.xsl +++ b/asio/src/doc/reference.xsl @@ -52,7 +52,7 @@ [include requirements/ConnectCondition.qbk] [include requirements/ConnectHandler.qbk] [include requirements/ConstBufferSequence.qbk] -[include requirements/DynamicBufferSequence.qbk] +[include requirements/DynamicBuffer.qbk] [include requirements/Endpoint.qbk] [include requirements/EndpointSequence.qbk] [include requirements/ExecutionContext.qbk] diff --git a/asio/src/doc/requirements/DynamicBufferSequence.qbk b/asio/src/doc/requirements/DynamicBuffer.qbk similarity index 67% rename from asio/src/doc/requirements/DynamicBufferSequence.qbk rename to asio/src/doc/requirements/DynamicBuffer.qbk index 3f13cb99..4e0cd880 100644 --- a/asio/src/doc/requirements/DynamicBufferSequence.qbk +++ b/asio/src/doc/requirements/DynamicBuffer.qbk @@ -5,26 +5,24 @@ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /] -[section:DynamicBufferSequence Dynamic buffer sequence requirements] +[section:DynamicBuffer Dynamic buffer requirements] -A dynamic buffer sequence encapsulates 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 sequence, 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 sequence object is appended to the input sequence of the same -object. +A dynamic buffer encapsulates 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 +sequence, 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 +sequence object is appended to the input sequence of the same object. -A dynamic buffer sequence type `X` shall satisfy the requirements of -`MoveConstructible` (C++ Std, [moveconstructible]) types in addition to those -listed below. +A dynamic buffer type `X` shall satisfy the requirements of `MoveConstructible` +(C++ Std, [moveconstructible]) types in addition to those listed below. -In the table below, `X` denotes a dynamic buffer sequence class, `x` denotes a +In the table below, `X` denotes a dynamic buffer class, `x` denotes a value of type `X&`, `x1` denotes values of type `const X&`, and `n` denotes a value of type `size_t`, and `u` denotes an identifier. -[table DynamicBufferSequence requirements +[table DynamicBuffer requirements [[expression] [type] [assertion/note\npre/post-conditions]] [ [`X::const_buffers_type`] @@ -53,8 +51,7 @@ value of type `size_t`, and `u` denotes an identifier. [`x1.capacity()`] [`size_t`] [Returns the maximum sum of the sizes of the input sequence and output - sequence that the dynamic buffer sequence can hold without requiring - reallocation.] + sequence that the dynamic buffer can hold without requiring reallocation.] ] [ [`x1.data()`] @@ -68,9 +65,9 @@ value of type `size_t`, and `u` denotes an identifier. [Requires: `size() + n <= max_size()`.\n \n Returns a mutable buffer sequence `u` representing the output sequence, and - where `buffer_size(u) == n`. The dynamic buffer sequence reallocates - memory as required. All constant or mutable buffer sequences previously - obtained using `data()` or `prepare()` are invalidated.\n + where `buffer_size(u) == n`. The dynamic buffer reallocates memory as + required. All constant or mutable buffer sequences previously obtained + using `data()` or `prepare()` are invalidated.\n \n Throws: `length_error` if `size() + n > max_size()`.] ]