|
Clementine
|
Holds a buffer that can be modified. More...
#include <buffer.hpp>

Public Member Functions | |
| mutable_buffer () ASIO_NOEXCEPT | |
| Construct an empty buffer. | |
| mutable_buffer (void *data, std::size_t size) ASIO_NOEXCEPT | |
| Construct a buffer to represent a given memory range. | |
| void * | data () const ASIO_NOEXCEPT |
| Get a pointer to the beginning of the memory range. | |
| std::size_t | size () const ASIO_NOEXCEPT |
| Get the size of the memory range. | |
| mutable_buffer & | operator+= (std::size_t n) ASIO_NOEXCEPT |
| Move the start of the buffer by the specified number of bytes. | |
Related Functions | |
(Note that these are not member functions.) | |
| mutable_buffer | operator+ (const mutable_buffer &b, std::size_t n) ASIO_NOEXCEPT |
| Create a new modifiable buffer that is offset from the start of another. | |
| mutable_buffer | operator+ (std::size_t n, const mutable_buffer &b) ASIO_NOEXCEPT |
| Create a new modifiable buffer that is offset from the start of another. | |
Holds a buffer that can be modified.
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.
The contents of a buffer may be accessed using the data() and size() member functions:
The data() member function permits violations of type safety, so uses of it in application code should be carefully considered.
1.8.13