ConstBuffer
ConstBuffer
#include <icy/buffer.h>class ConstBufferDefined in src/base/include/icy/buffer.h:142
The ConstBuffer class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
List of all members
| Name | Kind | Owner |
|---|---|---|
ConstBuffer | function | Declared here |
ConstBuffer | function | Declared here |
ConstBuffer | function | Declared here |
data | function | Declared here |
size | function | Declared here |
cstr | function | Declared here |
str | function | Declared here |
_data | variable | Declared here |
_size | variable | Declared here |
Public Methods
| Return | Name | Description |
|---|---|---|
constexpr | ConstBuffer inline constexpr | Construct an empty buffer. |
constexpr | ConstBuffer inline constexpr | Construct a buffer to represent the given memory range. |
constexpr | ConstBuffer inline constexpr | Construct a non-modifiable buffer from a modifiable one. |
constexpr const void * | data const inline constexpr | |
constexpr size_t | size const inline constexpr | |
const char * | cstr const inline | Cast the buffer as a const char pointer. |
std::string | str const inline | Returns the buffer as a string. |
ConstBuffer
inline constexpr
constexpr inline constexpr ConstBuffer()Defined in src/base/include/icy/buffer.h:146
Construct an empty buffer.
ConstBuffer
inline constexpr
constexpr inline constexpr ConstBuffer(const void * data, size_t size)Defined in src/base/include/icy/buffer.h:153
Construct a buffer to represent the given memory range.
ConstBuffer
inline constexpr
constexpr inline constexpr ConstBuffer(const MutableBuffer & b)Defined in src/base/include/icy/buffer.h:160
Construct a non-modifiable buffer from a modifiable one.
data
const inline constexpr
constexpr inline constexpr const void * data() constDefined in src/base/include/icy/buffer.h:166
size
const inline constexpr
constexpr inline constexpr size_t size() constDefined in src/base/include/icy/buffer.h:167
cstr
const inline
inline const char * cstr() constDefined in src/base/include/icy/buffer.h:170
Cast the buffer as a const char pointer.
str
const inline
inline std::string str() constDefined in src/base/include/icy/buffer.h:173
Returns the buffer as a string.
Protected Attributes
_data
const void * _dataDefined in src/base/include/icy/buffer.h:176
_size
size_t _size