Base module

MutableBuffer

The [MutableBuffer]({#ref classicy_1_1MutableBuffer #}) class provides a safe representation of a buffer that can be modified.

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

ReturnNameDescription
constexprMutableBuffer inlineConstruct an empty buffer.
constexprMutableBuffer inlineConstruct a buffer to represent the given memory range.
constexpr void *data const inline
constexpr size_tsize const inline
char *cstr const inlineCast the buffer as a char pointer.
std::stringstr const inlineReturns 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() const

size

const inline

inline constexpr size_t size() const

cstr

const inline

inline char * cstr() const

Cast the buffer as a char pointer.


str

const inline

inline std::string str() const

Returns the buffer as a string.

Protected Attributes

ReturnNameDescription
void *_data
size_t_size

_data

void * _data

_size

size_t _size