RESTinio

Public Types | Public Member Functions | Private Attributes | List of all members
restinio::impl::shared_datasizeable_buf_t< Datasizeable > Class Template Referencefinal

Buffer based on shared_ptr of data-sizeable entity. More...

`#include <buffers.hpp>`

Inheritance diagram for restinio::impl::shared_datasizeable_buf_t< Datasizeable >:

## Public Types
using | shared_ptr_t = std::shared_ptr< Datasizeable >

## Public Member Functions
| shared_datasizeable_buf_t ()=delete
| shared_datasizeable_buf_t (shared_ptr_t buf_ptr) noexcept
| shared_datasizeable_buf_t (const shared_datasizeable_buf_t &)=delete
shared_datasizeable_buf_t & | operator= (const shared_datasizeable_buf_t &)=delete
| shared_datasizeable_buf_t (shared_datasizeable_buf_t &&) noexcept=default
shared_datasizeable_buf_t & | operator= (shared_datasizeable_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
shared_ptr_t | m_buf_ptr
| A shared pointer to a datasizeable entity. More...

## Detailed Description

template<typename Datasizeable>
class restinio::impl::shared_datasizeable_buf_t< Datasizeable >

Buffer based on shared_ptr of data-sizeable entity.

Definition at line 272 of file buffers.hpp.

## Member Typedef Documentation

## ◆ shared_ptr_t

template<typename Datasizeable >

using restinio::impl::shared_datasizeable_buf_t< Datasizeable >::shared_ptr_t = std::shared_ptr< Datasizeable >

Definition at line 275 of file buffers.hpp.

## Constructor & Destructor Documentation

## ◆ shared_datasizeable_buf_t() [1/4]

template<typename Datasizeable >

restinio::impl::shared_datasizeable_buf_t< Datasizeable >::shared_datasizeable_buf_t | ( |  | ) |
| delete

## ◆ shared_datasizeable_buf_t() [2/4]

template<typename Datasizeable >

restinio::impl::shared_datasizeable_buf_t< Datasizeable >::shared_datasizeable_buf_t | ( | shared_ptr_t | buf_ptr | ) |
| inline noexcept

Definition at line 279 of file buffers.hpp.

## ◆ shared_datasizeable_buf_t() [3/4]

template<typename Datasizeable >

restinio::impl::shared_datasizeable_buf_t< Datasizeable >::shared_datasizeable_buf_t | ( | const shared_datasizeable_buf_t< Datasizeable > & |  | ) |
| delete

## ◆ shared_datasizeable_buf_t() [4/4]

template<typename Datasizeable >

restinio::impl::shared_datasizeable_buf_t< Datasizeable >::shared_datasizeable_buf_t | ( | shared_datasizeable_buf_t< Datasizeable > && |  | ) |
| default noexcept

## Member Function Documentation

## ◆ buffer()

template<typename Datasizeable >

virtual asio_ns::const_buffer restinio::impl::shared_datasizeable_buf_t< Datasizeable >::buffer | ( |  | ) | const
| inline override virtual

Get asio buf entity.

Prepares an item for being used with ASIO API.

Implements restinio::impl::buf_iface_t.

Definition at line 295 of file buffers.hpp.

## ◆ operator=() [1/2]

template<typename Datasizeable >

shared_datasizeable_buf_t & restinio::impl::shared_datasizeable_buf_t< Datasizeable >::operator= | ( | const shared_datasizeable_buf_t< Datasizeable > & |  | ) |
| delete

## ◆ operator=() [2/2]

template<typename Datasizeable >

shared_datasizeable_buf_t & restinio::impl::shared_datasizeable_buf_t< Datasizeable >::operator= | ( | shared_datasizeable_buf_t< Datasizeable > && |  | ) |
| delete

## ◆ relocate_to()

template<typename Datasizeable >

virtual void restinio::impl::shared_datasizeable_buf_t< Datasizeable >::relocate_to | ( | void * | storage | ) |
| inline override virtual

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 300 of file buffers.hpp.

## ◆ size()

template<typename Datasizeable >

virtual std::size_t restinio::impl::shared_datasizeable_buf_t< Datasizeable >::size | ( |  | ) | const
| inline override virtual

Get the size of a writable piece of data.

Implements restinio::impl::writable_base_t.

Definition at line 312 of file buffers.hpp.

## Member Data Documentation

## ◆ m_buf_ptr

template<typename Datasizeable >

shared_ptr_t restinio::impl::shared_datasizeable_buf_t< Datasizeable >::m_buf_ptr
| private

A shared pointer to a datasizeable entity.

Definition at line 317 of file buffers.hpp.

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

- restinio/buffers.hpp