restinio::impl::const_buf_t Class Referencefinal

Buffer entity for const buffer. More...

`#include <buffers.hpp>`

Inheritance diagram for restinio::impl::const_buf_t:

## Public Member Functions

| const_buf_t ()=delete
constexpr | const_buf_t (const void *data, std::size_t size) noexcept
| const_buf_t (const const_buf_t &)=delete
const_buf_t & | operator= (const const_buf_t &)=delete
| const_buf_t (const_buf_t &&)=default
const_buf_t & | operator= (const_buf_t &&)=delete
An implementation of writable_base_t interface.

See also
  writable_base_t

virtual asio_ns::const_buffer | buffer () const override
| Get asio buf entity. More...
virtual void | relocate_to (void *storage) override
| Move this buffer enitity to a given location. More...
An implementation of buf_iface_t interface.

See also
  buf_iface_t

virtual std::size_t | size () const override
| Get the size of a writable piece of data. More...
virtual asio_ns::const_buffer | buffer () const =0
| Get asio buf entity. More...
Public Member Functions inherited from restinio::impl::writable_base_t
| writable_base_t ()=default
| writable_base_t (const writable_base_t &)=default
| writable_base_t (writable_base_t &&)=default
writable_base_t & | operator= (const writable_base_t &)=delete
writable_base_t & | operator= (writable_base_t &&)=delete
virtual | ~writable_base_t ()
virtual void | relocate_to (void *storage)=0
| Move this buffer enitity to a given location. More...
virtual std::size_t | size () const =0
| Get the size of a writable piece of data. More...

## Private Attributes

const void *const | m_data
| A pointer to data. More...
const std::size_t | m_size
| The size of data. More...

## Detailed Description

Buffer entity for const buffer.

Definition at line 130 of file buffers.hpp.

## Constructor & Destructor Documentation

## const_buf_t() [1/4]

restinio::impl::const_buf_t::const_buf_t | ( |  | ) |

delete

## const_buf_t() [2/4]

constexpr restinio::impl::const_buf_t::const_buf_t | ( | const void * | data,
|  | std::size_t | size
| ) |  |

inlineconstexprnoexcept

Definition at line 135 of file buffers.hpp.

## const_buf_t() [3/4]

restinio::impl::const_buf_t::const_buf_t | ( | const const_buf_t & |  | ) |

delete

## const_buf_t() [4/4]

restinio::impl::const_buf_t::const_buf_t | ( | const_buf_t && |  | ) |

default

## Member Function Documentation

## buffer()

virtual asio_ns::const_buffer restinio::impl::const_buf_t::buffer | ( |  | ) | const

inlineoverridevirtual

Get asio buf entity.

Prepares an item for being used with ASIO API.

Implements restinio::impl::buf_iface_t.

Definition at line 152 of file buffers.hpp.

## operator=() [1/2]

const_buf_t & restinio::impl::const_buf_t::operator= | ( | const const_buf_t & |  | ) |

delete

## operator=() [2/2]

const_buf_t & restinio::impl::const_buf_t::operator= | ( | const_buf_t && |  | ) |

delete

## relocate_to()

virtual void restinio::impl::const_buf_t::relocate_to | ( | void * | storage | ) |

inlineoverridevirtual

Move this buffer enitity to a given location.

Note
  storage must have a sufficient space and proper alignment.

Implements restinio::impl::writable_base_t.

Definition at line 157 of file buffers.hpp.

## size()

virtual std::size_t restinio::impl::const_buf_t::size | ( |  | ) | const

inlineoverridevirtual

Get the size of a writable piece of data.

Implements restinio::impl::writable_base_t.

Definition at line 169 of file buffers.hpp.

## Member Data Documentation

## m_data

const void* const restinio::impl::const_buf_t::m_data

private

A pointer to data.

Definition at line 174 of file buffers.hpp.

## m_size

const std::size_t restinio::impl::const_buf_t::m_size

private

The size of data.

Definition at line 176 of file buffers.hpp.

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

- restinio/buffers.hpp