#include <buffer.hpp>

Public Member Functions | |
| mutable_buffer () | |
| Construct an empty buffer. | |
| mutable_buffer (void *data, std::size_t size) | |
| Construct a buffer to represent a given memory range. | |
Private Attributes | |
| void * | data_ |
| std::size_t | size_ |
Friends | |
| void * | buffer_cast_helper (const mutable_buffer &b) |
| std::size_t | buffer_size_helper (const mutable_buffer &b) |
Related Functions | |
| (Note that these are not member functions.) | |
| template<typename PointerToPodType> | |
| PointerToPodType | buffer_cast (const mutable_buffer &b) |
| Cast a non-modifiable buffer to a specified pointer to POD type. | |
| std::size_t | buffer_size (const mutable_buffer &b) |
| Get the number of bytes in a non-modifiable buffer. | |
| mutable_buffer | operator+ (const mutable_buffer &b, std::size_t start) |
| Create a new modifiable buffer that is offset from the start of another. | |
| mutable_buffer | operator+ (std::size_t start, const mutable_buffer &b) |
| Create a new modifiable buffer that is offset from the start of another. | |
The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
Definition at line 61 of file buffer.hpp.
| asio::mutable_buffer::mutable_buffer | ( | ) | [inline] |
| asio::mutable_buffer::mutable_buffer | ( | void * | data, | |
| std::size_t | size | |||
| ) | [inline] |
| void* buffer_cast_helper | ( | const mutable_buffer & | b | ) | [friend] |
| std::size_t buffer_size_helper | ( | const mutable_buffer & | b | ) | [friend] |
| PointerToPodType buffer_cast | ( | const mutable_buffer & | b | ) | [related] |
Cast a non-modifiable buffer to a specified pointer to POD type.
Definition at line 130 of file buffer.hpp.
References asio::detail::buffer_cast_helper().
| std::size_t buffer_size | ( | const mutable_buffer & | b | ) | [related] |
Get the number of bytes in a non-modifiable buffer.
Definition at line 139 of file buffer.hpp.
References asio::detail::buffer_size_helper().
| mutable_buffer operator+ | ( | const mutable_buffer & | b, | |
| std::size_t | start | |||
| ) | [related] |
Create a new modifiable buffer that is offset from the start of another.
Definition at line 148 of file buffer.hpp.
| mutable_buffer operator+ | ( | std::size_t | start, | |
| const mutable_buffer & | b | |||
| ) | [related] |
Create a new modifiable buffer that is offset from the start of another.
Definition at line 165 of file buffer.hpp.
void* asio::mutable_buffer::data_ [private] |
std::size_t asio::mutable_buffer::size_ [private] |
1.5.6