fastdo  0.5.12
winux::GrowBuffer类 参考

高效的可增长缓冲区,1.33倍冗余量 更多...

#include <utilities.hpp>

类 winux::GrowBuffer 继承关系图:
winux::GrowBuffer 的协作图:

Public 成员函数

 GrowBuffer (uint capacity=0)
 构造函数,初始化缓冲区的大小 更多...
 
 GrowBuffer (GrowBuffer const &other)
 
GrowBufferoperator= (GrowBuffer const &other)
 
 GrowBuffer (Buffer const &other)
 
GrowBufferoperator= (Buffer const &other)
 
 GrowBuffer (GrowBuffer &&other)
 移动构造函数 更多...
 
GrowBufferoperator= (GrowBuffer &&other)
 移动赋值操作 更多...
 
 GrowBuffer (Buffer &&other)
 移动构造函数1 更多...
 
GrowBufferoperator= (Buffer &&other)
 移动赋值操作1 更多...
 
void append (void const *data, uint size)
 添加数据 更多...
 
void append (AnsiString const &data)
 添加数据 更多...
 
void append (Buffer const &data)
 添加数据 更多...
 
void erase (uint start, uint count=(uint)-1)
 擦除数据,自动紧缩 更多...
 
- Public 成员函数 继承自 winux::Buffer
 Buffer ()
 默认构造函数 更多...
 
 Buffer (void *buf, uint size, bool isPeek=false)
 构造函数1 从一个缓冲区创建Buffer,可以指定是否为窥视模式 更多...
 
 Buffer (AnsiString const &data, bool isPeek=false)
 构造函数2 从一个AnsiString创建Buffer,可以指定是否为窥视模式 更多...
 
virtual ~Buffer ()
 
 Buffer (Buffer const &other)
 
Bufferoperator= (Buffer const &other)
 
 Buffer (Buffer &&other)
 移动构造函数 更多...
 
Bufferoperator= (Buffer &&other)
 移动赋值操作 更多...
 
 Buffer (GrowBuffer &&other)
 移动构造函数1 更多...
 
Bufferoperator= (GrowBuffer &&other)
 移动赋值操作1 更多...
 
void setBuf (void *buf, uint size, uint capacity, bool isPeek)
 设置缓冲区,当isPeek为false时拷贝数据缓冲区 更多...
 
void setBuf (void *buf, uint size, bool isPeek)
 设置缓冲区,当isPeek为false时拷贝数据缓冲区 更多...
 
void alloc (uint capacity, bool setDataSize=true)
 分配容量大小,当setDataSize为true时设置数据长度 更多...
 
void realloc (uint newCapacity)
 重新调整容量的大小,保留数据内容 更多...
 
bool peekCopy (bool copyCapacity=false)
 把窥探模式变为拷贝模式,如果copyCapacity为true时连容量也一起拷贝,否则只拷贝数据。 更多...
 
void free ()
 释放缓冲区 更多...
 
void * getBuf () const
 暴露缓冲区指针 更多...
 
template<typename _Ty >
_Ty * getBuf () const
 
winux::byteoperator[] (int i)
 
winux::byte const & operator[] (int i) const
 
uint getSize () const
 获取数据大小 更多...
 
void _setSize (uint dataSize)
 设置数据大小,不能超过容量大小(不建议外部调用) 更多...
 
uint getCapacity () const
 获取容量大小 更多...
 
 operator bool () const
 判断是否为一个有效的Buffer 更多...
 
template<typename _ChTy >
std::basic_string< _ChTy > toString () const
 转换到字符串 更多...
 
AnsiString toAnsi () const
 转换到AnsiString 更多...
 
UnicodeString toUnicode () const
 转换到UnicodeString 更多...
 

友元

class Buffer
 

额外继承的成员函数

- 静态 Protected 成员函数 继承自 winux::Buffer
static void * _Alloc (uint size)
 
static void * _Realloc (void *p, uint newSize)
 
static void _Free (void *p)
 
- Protected 属性 继承自 winux::Buffer
void * _buf
 
uint _dataSize
 
uint _capacity
 
bool _isPeek
 

详细描述

高效的可增长缓冲区,1.33倍冗余量

在文件 utilities.hpp531 行定义.

构造及析构函数说明

winux::GrowBuffer::GrowBuffer ( uint  capacity = 0)
explicit

构造函数,初始化缓冲区的大小

winux::GrowBuffer::GrowBuffer ( GrowBuffer const &  other)
winux::GrowBuffer::GrowBuffer ( Buffer const &  other)
explicit
winux::GrowBuffer::GrowBuffer ( GrowBuffer &&  other)

移动构造函数

winux::GrowBuffer::GrowBuffer ( Buffer &&  other)

移动构造函数1

成员函数说明

void winux::GrowBuffer::append ( void const *  data,
uint  size 
)

添加数据

void winux::GrowBuffer::append ( AnsiString const &  data)
inline

添加数据

在文件 utilities.hpp556 行定义.

函数调用图:

void winux::GrowBuffer::append ( Buffer const &  data)
inline

添加数据

在文件 utilities.hpp559 行定义.

函数调用图:

void winux::GrowBuffer::erase ( uint  start,
uint  count = (uint)-1 
)

擦除数据,自动紧缩

GrowBuffer& winux::GrowBuffer::operator= ( GrowBuffer const &  other)
GrowBuffer& winux::GrowBuffer::operator= ( Buffer const &  other)
GrowBuffer& winux::GrowBuffer::operator= ( GrowBuffer &&  other)

移动赋值操作

GrowBuffer& winux::GrowBuffer::operator= ( Buffer &&  other)

移动赋值操作1

友元及相关函数文档

friend class Buffer
friend

在文件 utilities.hpp565 行定义.


该类的文档由以下文件生成: