Class qqmusic::utils::buffer
ClassList > qqmusic > utils > buffer
二进制缓冲区的统一表示
#include <buffer.h>
Inherits the following classes: std::vector< uint8_t >
Public Functions
Type | Name |
---|---|
void | append (const void * src_data_buf, size_t data_buf_size) 将一段内存插到这段buffer后面 |
buffer () = default 默认初始化 |
|
buffer (size_t size) 预先分配异丁醇长度 |
|
buffer (const uint8_t * src_head, size_t src_size) 直接从内存区域进行构造 |
|
buffer (std::vector< uint8_t > && other) noexcept 从std::vector<uint8_t>移动构造 |
|
buffer (buffer && other) noexcept 移动构造 |
|
buffer (size_t size, char c) 初始化为特定字符 |
|
buffer (const buffer & other) = default 拷贝构造函数 |
|
buffer | operator+ (const buffer & a) 两段buffer拼接, 并返回构造新的buffer |
buffer | operator+= (const buffer & a) 将一段buffer插入本段buffer末尾 |
buffer & | operator= (const buffer & other) = default 拷贝构造函数, 重载 = __ |
~buffer () = default |
Public Functions Documentation
function append
将一段内存插到这段buffer后面
Parameters:
src_data_buf
待插入数据的首地址data_buf_size
待插入数据的长度
function buffer [1/7]
默认初始化
function buffer [2/7]
预先分配异丁醇长度
Parameters:
size
预先分配长度
function buffer [3/7]
直接从内存区域进行构造
Parameters:
src_head
内存区域的首地址src_size
内存区域长度
Note:
是拷贝初始化
function buffer [4/7]
从std::vector<uint8_t>移动构造
Parameters:
other
function buffer [5/7]
移动构造
Parameters:
other
function buffer [6/7]
初始化为特定字符
Parameters:
size
预先初始化长度c
需要填充的字符
function buffer [7/7]
拷贝构造函数
Parameters:
other
function operator+
两段buffer拼接, 并返回构造新的buffer
Parameters:
a
function operator+=
将一段buffer插入本段buffer末尾
Parameters:
a
function operator=
拷贝构造函数, 重载 =
__
Parameters:
other
function ~buffer
The documentation for this class was generated from the following file include/qqmusic/utils/buffer.h