Public Member Functions | List of all members
restinio::impl::writable_base_t Class Referenceabstract

A base class for writable items. More...

#include <buffers.hpp>

Inheritance diagram for restinio::impl::writable_base_t:
restinio::impl::buf_iface_t restinio::impl::sendfile_write_operation_t restinio::impl::const_buf_t restinio::impl::datasizeable_buf_t< Datasizeable > restinio::impl::empty_buf_t restinio::impl::shared_datasizeable_buf_t< Datasizeable >

Public Member Functions

 writable_base_t ()=default
 writable_base_t (const writable_base_t &)=default
 writable_base_t (writable_base_t &&)=default
writable_base_toperator= (const writable_base_t &)=delete
writable_base_toperator= (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...

Detailed Description

A base class for writable items.

Having a condition to put heterogeneous writable-items sequence in vector and to transfer it from builders to connection context, internal writable-items are the pieces incapsulating various implementation that fit into a fixed memory space. That's makes it possible to fit any of them in a binary buffer that resides in writable_item_t. While different descendants might vary in size size of writable_item_t remains the same, so it can be used in a vector.

Definition at line 42 of file buffers.hpp.

Constructor & Destructor Documentation

◆ writable_base_t() [1/3]

restinio::impl::writable_base_t::writable_base_t ( )

◆ writable_base_t() [2/3]

restinio::impl::writable_base_t::writable_base_t ( const writable_base_t )

◆ writable_base_t() [3/3]

restinio::impl::writable_base_t::writable_base_t ( writable_base_t &&  )

◆ ~writable_base_t()

virtual restinio::impl::writable_base_t::~writable_base_t ( )

Definition at line 51 of file buffers.hpp.

Member Function Documentation

◆ operator=() [1/2]

writable_base_t& restinio::impl::writable_base_t::operator= ( const writable_base_t )

◆ operator=() [2/2]

writable_base_t& restinio::impl::writable_base_t::operator= ( writable_base_t &&  )

◆ relocate_to()

virtual void restinio::impl::writable_base_t::relocate_to ( void *  storage)
pure virtual

Move this buffer enitity to a given location.

storage must have a sufficient space and proper alignment.

Implemented in restinio::impl::sendfile_write_operation_t, restinio::impl::shared_datasizeable_buf_t< Datasizeable >, restinio::impl::datasizeable_buf_t< Datasizeable >, restinio::impl::const_buf_t, and restinio::impl::empty_buf_t.

◆ size()

virtual std::size_t restinio::impl::writable_base_t::size ( ) const
pure virtual

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