Home
Base module

MutableBuffer

The MutableBuffer class provides a safe representation of a buffer that can be modified.

MutableBuffer

#include <icy/buffer.h>
class MutableBuffer

Defined 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.

List of all members

NameKindOwner
MutableBufferfunctionDeclared here
MutableBufferfunctionDeclared here
datafunctionDeclared here
sizefunctionDeclared here
cstrfunctionDeclared here
strfunctionDeclared here
_datavariableDeclared here
_sizevariableDeclared here

Public Methods

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

constexpr inline constexpr void * data() const

Defined in src/base/include/icy/buffer.h:57


size

const inline constexpr

constexpr inline constexpr size_t size() const

Defined in src/base/include/icy/buffer.h:58


cstr

const inline

inline char * cstr() const

Defined in src/base/include/icy/buffer.h:61

Cast the buffer as a char pointer.


str

const inline

inline std::string str() const

Defined in src/base/include/icy/buffer.h:64

Returns the buffer as a string.

Protected Attributes

ReturnNameDescription
void *_data
size_t_size

_data

void * _data

Defined in src/base/include/icy/buffer.h:67


_size

size_t _size

Defined in src/base/include/icy/buffer.h:68