Base module
MutableBuffer
The MutableBuffer 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.
MutableBuffer
#include <icy/buffer.h>The MutableBuffer 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.
Public Methods
| Return | Name | Description |
|---|---|---|
constexpr | MutableBuffer inline | Construct an empty buffer. |
constexpr | MutableBuffer inline | Construct a buffer to represent the given memory range. |
constexpr void * | data const inline | |
constexpr size_t | size const inline | |
char * | cstr const inline | Cast the buffer as a char pointer. |
std::string | str const inline | Returns the buffer as a string. |
MutableBuffer
inline
inline constexpr MutableBuffer()Construct an empty buffer.
MutableBuffer
inline
inline constexpr MutableBuffer(void * data, size_t size)Construct a buffer to represent the given memory range.
data
const inline
inline constexpr void * data() constsize
const inline
inline constexpr size_t size() constcstr
const inline
inline char * cstr() constCast the buffer as a char pointer.
str
const inline
inline std::string str() constReturns the buffer as a string.
Protected Attributes
_data
void * _data_size
size_t _size