MySQL 9.0.0
Source Code Documentation
net::impl::dynamic_buffer_base< T > Class Template Reference

#include <buffer.h>

Public Types

using const_buffers_type = const_buffer
 
using mutable_buffers_type = mutable_buffer
 

Public Member Functions

 dynamic_buffer_base (T &v) noexcept
 
 dynamic_buffer_base (T &v, size_t max_size) noexcept
 
size_t size () const noexcept
 number of bytes. More...
 
size_t max_size () const noexcept
 max number of bytes. More...
 
size_t capacity () const noexcept
 max number of bytes without requiring reallocation. More...
 
const_buffers_type data (size_t pos, size_t n) const noexcept
 
mutable_buffers_type data (size_t pos, size_t n)
 
void grow (size_t n)
 append bytes at the end. More...
 
void shrink (size_t n)
 remove bytes at the end. More...
 
void consume (size_t n)
 remove bytes at the start. More...
 

Private Attributes

T & v_
 
const size_t max_size_
 

Member Typedef Documentation

◆ const_buffers_type

◆ mutable_buffers_type

Constructor & Destructor Documentation

◆ dynamic_buffer_base() [1/2]

template<class T >
net::impl::dynamic_buffer_base< T >::dynamic_buffer_base ( T &  v)
inlineexplicitnoexcept

◆ dynamic_buffer_base() [2/2]

template<class T >
net::impl::dynamic_buffer_base< T >::dynamic_buffer_base ( T &  v,
size_t  max_size 
)
inlinenoexcept

Member Function Documentation

◆ capacity()

template<class T >
size_t net::impl::dynamic_buffer_base< T >::capacity ( ) const
inlinenoexcept

max number of bytes without requiring reallocation.

◆ consume()

template<class T >
void net::impl::dynamic_buffer_base< T >::consume ( size_t  n)
inline

remove bytes at the start.

◆ data() [1/2]

template<class T >
mutable_buffers_type net::impl::dynamic_buffer_base< T >::data ( size_t  pos,
size_t  n 
)
inline

◆ data() [2/2]

template<class T >
const_buffers_type net::impl::dynamic_buffer_base< T >::data ( size_t  pos,
size_t  n 
) const
inlinenoexcept

◆ grow()

template<class T >
void net::impl::dynamic_buffer_base< T >::grow ( size_t  n)
inline

append bytes at the end.

◆ max_size()

template<class T >
size_t net::impl::dynamic_buffer_base< T >::max_size ( ) const
inlinenoexcept

max number of bytes.

◆ shrink()

template<class T >
void net::impl::dynamic_buffer_base< T >::shrink ( size_t  n)
inline

remove bytes at the end.

◆ size()

template<class T >
size_t net::impl::dynamic_buffer_base< T >::size ( ) const
inlinenoexcept

number of bytes.

Member Data Documentation

◆ max_size_

template<class T >
const size_t net::impl::dynamic_buffer_base< T >::max_size_
private

◆ v_

template<class T >
T& net::impl::dynamic_buffer_base< T >::v_
private

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