RESTinio
|
Group of writable items transported to the context of underlying connection as one solid piece. More...
#include <buffers.hpp>
Public Member Functions | |
write_group_t (writable_items_container_t items) noexcept | |
Construct write group with a given bunch of writable items. More... | |
~write_group_t () noexcept | |
Destruct object. More... | |
auto | items_count () const noexcept |
Get the count of stored items. More... | |
const auto & | items () const noexcept |
Get access to the stored items. More... | |
auto & | items () noexcept |
Get access to the stored items. More... | |
void | reset () noexcept |
Reset group. More... | |
void | merge (write_group_t second) |
Merges with another group. More... | |
Copy semantics. | |
Not allowed. | |
write_group_t (const write_group_t &)=delete | |
write_group_t & | operator= (const write_group_t &)=delete |
Move semantics. | |
Moves object leaving a moved one in clean state. | |
write_group_t (write_group_t &&wg) noexcept | |
write_group_t & | operator= (write_group_t &&wg) noexcept |
Auxiliary data. | |
Accessors for working with auxiliary data. | |
void | status_line_size (std::size_t n) |
std::size_t | status_line_size () const noexcept |
Get status line size. More... | |
void | after_write_notificator (write_status_cb_t notificator) noexcept |
Set after write notificator. More... | |
bool | has_after_write_notificator () const noexcept |
Is there an after write notificator set? More... | |
void | invoke_after_write_notificator_if_exists (const asio_ns::error_code &ec) |
Get after write notificator. More... | |
Private Attributes | |
writable_items_container_t | m_items |
A buffer objects included in this group. More... | |
std::size_t | m_status_line_size |
A size of status line located in first "buffer". More... | |
write_status_cb_t | m_after_write_notificator |
A callback to invoke once the the write opertaion of a given group completes. More... | |
Friends | |
void | swap (write_group_t &left, write_group_t &right) noexcept |
Swap two groups. More... | |
Group of writable items transported to the context of underlying connection as one solid piece.
Definition at line 691 of file buffers.hpp.
|
inlineexplicitnoexcept |
Construct write group with a given bunch of writable items.
items | A buffer objects included in this group. |
Definition at line 705 of file buffers.hpp.
|
delete |
|
inlinenoexcept |
Definition at line 724 of file buffers.hpp.
|
inlinenoexcept |
Destruct object.
If notificator was not called it would be invoked with error.
Definition at line 746 of file buffers.hpp.
|
inlinenoexcept |
Set after write notificator.
Definition at line 801 of file buffers.hpp.
|
inlinenoexcept |
Is there an after write notificator set?
Definition at line 808 of file buffers.hpp.
|
inline |
Get after write notificator.
Definition at line 815 of file buffers.hpp.
|
inlinenoexcept |
Get access to the stored items.
Definition at line 839 of file buffers.hpp.
|
inlinenoexcept |
Get access to the stored items.
Should be used for cases where we should have a non-const access to writeable items.
Definition at line 852 of file buffers.hpp.
|
inlinenoexcept |
Get the count of stored items.
Definition at line 832 of file buffers.hpp.
|
inline |
Merges with another group.
Two groups can be merged if the first one has no after-write callback and the second one has no status line size.
Definition at line 881 of file buffers.hpp.
|
delete |
|
inlinenoexcept |
Definition at line 733 of file buffers.hpp.
|
inlinenoexcept |
Reset group.
Definition at line 859 of file buffers.hpp.
|
inlinenoexcept |
Get status line size.
Definition at line 794 of file buffers.hpp.
|
inline |
Definition at line 763 of file buffers.hpp.
|
friend |
Swap two groups.
Definition at line 696 of file buffers.hpp.
|
private |
A callback to invoke once the the write opertaion of a given group completes.
Definition at line 906 of file buffers.hpp.
|
private |
A buffer objects included in this group.
Definition at line 896 of file buffers.hpp.
|
private |
A size of status line located in first "buffer".
If the value is not 0 then it means it references a piece of data stored in the first buffer of m_items container.
Definition at line 903 of file buffers.hpp.