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:

## Public Member Functions

| 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...

## 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 encapsulating 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 59 of file buffers.hpp.

## Constructor & Destructor Documentation

## writable_base_t() [1/3]

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

default

## writable_base_t() [2/3]

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

default

## writable_base_t() [3/3]

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

default

## ~writable_base_t()

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

inline virtual

Definition at line 68 of file buffers.hpp.

## Member Function Documentation

## operator=() [1/2]

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

delete

## operator=() [2/2]

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

delete

## relocate_to()

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

pure virtual

Move this buffer enitity to a given location.

Note
  storage must have a sufficient space and proper alignment.

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

## size()

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

pure virtual

Get the size of a writable piece of data.

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

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

- restinio/buffers.hpp