ゴミ箱
Classes | Public Types | Public Member Functions | Friends | List of all members
boost::beast::basic_multi_buffer< Allocator > Class Template Reference

#include <multi_buffer.hpp>

Inheritance diagram for boost::beast::basic_multi_buffer< Allocator >:
boost::beast::detail::empty_base_optimization< detail::allocator_traits< Allocator >::template rebind_alloc< char > >

Classes

class  const_buffers_type
 
class  element
 
class  mutable_buffers_type
 

Public Types

using allocator_type = Allocator
 The type of allocator used. More...
 

Public Member Functions

 ~basic_multi_buffer ()
 Destructor. More...
 
 basic_multi_buffer ()
 
 basic_multi_buffer (std::size_t limit)
 
 basic_multi_buffer (Allocator const &alloc)
 
 basic_multi_buffer (std::size_t limit, Allocator const &alloc)
 
 basic_multi_buffer (basic_multi_buffer &&other)
 
 basic_multi_buffer (basic_multi_buffer &&other, Allocator const &alloc)
 
 basic_multi_buffer (basic_multi_buffer const &other)
 
 basic_multi_buffer (basic_multi_buffer const &other, Allocator const &alloc)
 
template<class OtherAlloc >
 basic_multi_buffer (basic_multi_buffer< OtherAlloc > const &other)
 
template<class OtherAlloc >
 basic_multi_buffer (basic_multi_buffer< OtherAlloc > const &other, allocator_type const &alloc)
 
basic_multi_bufferoperator= (basic_multi_buffer &&other)
 
basic_multi_bufferoperator= (basic_multi_buffer const &other)
 
template<class OtherAlloc >
basic_multi_bufferoperator= (basic_multi_buffer< OtherAlloc > const &other)
 
allocator_type get_allocator () const
 Returns a copy of the associated allocator. More...
 
size_type size () const
 Returns the size of the input sequence. More...
 
size_type max_size () const
 Returns the permitted maximum sum of the sizes of the input and output sequence. More...
 
std::size_t capacity () const
 Returns the maximum sum of the sizes of the input sequence and output sequence the buffer can hold without requiring reallocation. More...
 
const_buffers_type data () const
 
mutable_buffers_type prepare (size_type n)
 
void commit (size_type n)
 
void consume (size_type n)
 Remove bytes from the input sequence. More...
 
template<class OtherAlloc >
auto operator= (basic_multi_buffer< OtherAlloc > const &other) -> basic_multi_buffer &
 

Friends

template<class OtherAlloc >
class basic_multi_buffer
 
template<class Alloc >
void swap (basic_multi_buffer< Alloc > &lhs, basic_multi_buffer< Alloc > &rhs)
 

Detailed Description

template<class Allocator>
class boost::beast::basic_multi_buffer< Allocator >

A DynamicBuffer that uses multiple buffers internally.

The implementation uses a sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.

Note
Meets the requirements of DynamicBuffer.
Template Parameters
AllocatorThe allocator to use for managing memory.

Member Typedef Documentation

template<class Allocator>
using boost::beast::basic_multi_buffer< Allocator >::allocator_type = Allocator

The type of allocator used.

Constructor & Destructor Documentation

template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::~basic_multi_buffer ( )

Destructor.

template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( )

Constructor

Upon construction, capacity will be zero.

template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( std::size_t  limit)
explicit

Constructor.

Parameters
limitThe setting for max_size.
template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( Allocator const &  alloc)
explicit

Constructor.

Parameters
allocThe allocator to use.
template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( std::size_t  limit,
Allocator const &  alloc 
)

Constructor.

Parameters
limitThe setting for max_size.
allocThe allocator to use.
template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( basic_multi_buffer< Allocator > &&  other)

Move constructor

After the move, *this will have an empty output sequence.

Parameters
otherThe object to move from. After the move, The object's state will be as if constructed using its current allocator and limit.
template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( basic_multi_buffer< Allocator > &&  other,
Allocator const &  alloc 
)

Move constructor

After the move, *this will have an empty output sequence.

Parameters
otherThe object to move from. After the move, The object's state will be as if constructed using its current allocator and limit.
allocThe allocator to use.
template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( basic_multi_buffer< Allocator > const &  other)

Copy constructor.

Parameters
otherThe object to copy from.
template<class Allocator >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( basic_multi_buffer< Allocator > const &  other,
Allocator const &  alloc 
)

Copy constructor

Parameters
otherThe object to copy from.
allocThe allocator to use.
template<class Allocator >
template<class OtherAlloc >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( basic_multi_buffer< OtherAlloc > const &  other)

Copy constructor.

Parameters
otherThe object to copy from.
template<class Allocator >
template<class OtherAlloc >
boost::beast::basic_multi_buffer< Allocator >::basic_multi_buffer ( basic_multi_buffer< OtherAlloc > const &  other,
allocator_type const &  alloc 
)

Copy constructor.

Parameters
otherThe object to copy from.
allocThe allocator to use.

Member Function Documentation

template<class Allocator >
std::size_t boost::beast::basic_multi_buffer< Allocator >::capacity ( ) const

Returns the maximum sum of the sizes of the input sequence and output sequence the buffer can hold without requiring reallocation.

template<class Allocator >
void boost::beast::basic_multi_buffer< Allocator >::commit ( size_type  n)

Move bytes from the output sequence to the input sequence.

Note
Buffers representing the input sequence acquired prior to this call remain valid.
template<class Allocator >
void boost::beast::basic_multi_buffer< Allocator >::consume ( size_type  n)

Remove bytes from the input sequence.

template<class Allocator >
auto boost::beast::basic_multi_buffer< Allocator >::data ( ) const

Get a list of buffers that represents the input sequence.

Note
These buffers remain valid across subsequent calls to prepare.
template<class Allocator>
allocator_type boost::beast::basic_multi_buffer< Allocator >::get_allocator ( ) const
inline

Returns a copy of the associated allocator.

template<class Allocator>
size_type boost::beast::basic_multi_buffer< Allocator >::max_size ( ) const
inline

Returns the permitted maximum sum of the sizes of the input and output sequence.

template<class Allocator >
auto boost::beast::basic_multi_buffer< Allocator >::operator= ( basic_multi_buffer< Allocator > &&  other)

Move assignment

After the move, *this will have an empty output sequence.

Parameters
otherThe object to move from. After the move, The object's state will be as if constructed using its current allocator and limit.
template<class Allocator >
auto boost::beast::basic_multi_buffer< Allocator >::operator= ( basic_multi_buffer< Allocator > const &  other)

Copy assignment

After the copy, *this will have an empty output sequence.

Parameters
otherThe object to copy from.
template<class Allocator>
template<class OtherAlloc >
basic_multi_buffer& boost::beast::basic_multi_buffer< Allocator >::operator= ( basic_multi_buffer< OtherAlloc > const &  other)

Copy assignment

After the copy, *this will have an empty output sequence.

Parameters
otherThe object to copy from.
template<class Allocator>
template<class OtherAlloc >
auto boost::beast::basic_multi_buffer< Allocator >::operator= ( basic_multi_buffer< OtherAlloc > const &  other) -> basic_multi_buffer&
template<class Allocator >
auto boost::beast::basic_multi_buffer< Allocator >::prepare ( size_type  n)

Get a list of buffers that represents the output sequence, with the given size.

Note
Buffers representing the input sequence acquired prior to this call remain valid.
template<class Allocator>
size_type boost::beast::basic_multi_buffer< Allocator >::size ( ) const
inline

Returns the size of the input sequence.

Friends And Related Function Documentation

template<class Allocator>
template<class OtherAlloc >
friend class basic_multi_buffer
friend
template<class Allocator>
template<class Alloc >
void swap ( basic_multi_buffer< Alloc > &  lhs,
basic_multi_buffer< Alloc > &  rhs 
)
friend

The documentation for this class was generated from the following files: