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

#include <buffer_prefix.hpp>

Classes

class  const_iterator
 

Public Types

using value_type = typename std::conditional< std::is_convertible< typename std::iterator_traits< iter_type >::value_type, boost::asio::mutable_buffer >::value, boost::asio::mutable_buffer, boost::asio::const_buffer >::type
 The type for each element in the list of buffers. More...
 

Public Member Functions

 buffer_prefix_view (buffer_prefix_view &&)
 Move constructor. More...
 
 buffer_prefix_view (buffer_prefix_view const &)
 Copy constructor. More...
 
buffer_prefix_viewoperator= (buffer_prefix_view &&)
 Move assignment. More...
 
buffer_prefix_viewoperator= (buffer_prefix_view const &)
 Copy assignment. More...
 
 buffer_prefix_view (std::size_t size, BufferSequence const &buffers)
 
template<class... Args>
 buffer_prefix_view (std::size_t size, boost::in_place_init_t, Args &&...args)
 
const_iterator begin () const
 Get a bidirectional iterator to the first element. More...
 
const_iterator end () const
 Get a bidirectional iterator to one past the last element. More...
 

Detailed Description

template<class BufferSequence>
class boost::beast::buffer_prefix_view< BufferSequence >

A buffer sequence adapter that shortens the sequence size.

The class adapts a buffer sequence to efficiently represent a shorter subset of the original list of buffers starting with the first byte of the original sequence.

Template Parameters
BufferSequenceThe buffer sequence to adapt.

Member Typedef Documentation

template<class BufferSequence>
using boost::beast::buffer_prefix_view< BufferSequence >::value_type = typename std::conditional< std::is_convertible<typename std::iterator_traits<iter_type>::value_type, boost::asio::mutable_buffer>::value, boost::asio::mutable_buffer, boost::asio::const_buffer>::type

The type for each element in the list of buffers.

Constructor & Destructor Documentation

template<class BufferSequence >
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view ( buffer_prefix_view< BufferSequence > &&  other)

Move constructor.

template<class BufferSequence >
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view ( buffer_prefix_view< BufferSequence > const &  other)

Copy constructor.

template<class BufferSequence >
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view ( std::size_t  size,
BufferSequence const &  buffers 
)

Construct a buffer sequence prefix.

Parameters
sizeThe maximum number of bytes in the prefix. If this is larger than the size of passed, buffers, the resulting sequence will represent the entire input sequence.
buffersThe buffer sequence to adapt. A copy of the sequence will be made, but ownership of the underlying memory is not transferred.
template<class BufferSequence >
template<class... Args>
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view ( std::size_t  size,
boost::in_place_init_t  ,
Args &&...  args 
)

Construct a buffer sequence prefix in-place.

Parameters
sizeThe maximum number of bytes in the prefix. If this is larger than the size of passed, buffers, the resulting sequence will represent the entire input sequence.
argsArguments forwarded to the contained buffers constructor.

Member Function Documentation

template<class BufferSequence >
auto boost::beast::buffer_prefix_view< BufferSequence >::begin ( ) const
inline

Get a bidirectional iterator to the first element.

template<class BufferSequence >
auto boost::beast::buffer_prefix_view< BufferSequence >::end ( ) const
inline

Get a bidirectional iterator to one past the last element.

template<class BufferSequence >
auto boost::beast::buffer_prefix_view< BufferSequence >::operator= ( buffer_prefix_view< BufferSequence > &&  other)

Move assignment.

template<class BufferSequence >
auto boost::beast::buffer_prefix_view< BufferSequence >::operator= ( buffer_prefix_view< BufferSequence > const &  other)

Copy assignment.


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