MutableBuffer
#include <buffer.h>
class MutableBufferDefined in src/base/include/icy/buffer.h:40
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 constexpr | Construct an empty buffer. |
constexpr | MutableBuffer inline constexpr | Construct a buffer to represent the given memory range. |
void * | data const inline nodiscard constexpr | |
size_t | size const inline nodiscard constexpr | |
char * | cstr const inline nodiscard | Cast the buffer as a char pointer. |
std::string | str const inline | Returns the buffer as a string. |
MutableBuffer
inline constexpr
constexpr inline constexpr MutableBuffer()Defined in src/base/include/icy/buffer.h:44
Construct an empty buffer.
MutableBuffer
inline constexpr
constexpr inline constexpr MutableBuffer(void * data, size_t size)Defined in src/base/include/icy/buffer.h:51
Construct a buffer to represent the given memory range.
data
const inline nodiscard constexpr
[[nodiscard]] constexpr inline void * data() constDefined in src/base/include/icy/buffer.h:57
size
const inline nodiscard constexpr
[[nodiscard]] constexpr inline size_t size() constDefined in src/base/include/icy/buffer.h:58
cstr
const inline nodiscard
[[nodiscard]] inline char * cstr() constDefined in src/base/include/icy/buffer.h:61
Cast the buffer as a char pointer.
str
const inline
inline std::string str() constDefined in src/base/include/icy/buffer.h:64
Returns the buffer as a string.
Protected Attributes
_data
void * _dataDefined in src/base/include/icy/buffer.h:67
_size
size_t _sizeDefined in src/base/include/icy/buffer.h:68