Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::io::InputBufferWrapper类 参考final

输入缓存包装器 更多...

#include <InputBufferWrapper.h>

类 sese::io::InputBufferWrapper 继承关系图:
sese::io::InputStream sese::io::PeekableStream

Public 成员函数

 InputBufferWrapper (const char *buffer, size_t cap)
 
int64_t read (void *buffer, size_t length) override
 
int64_t peek (void *buffer, size_t length) override
 
int64_t trunc (size_t length) override
 
void reset () noexcept
 
const char * getBuffer () const
 
size_t getLength () const
 
size_t getCapacity () const
 
- Public 成员函数 继承自 sese::io::InputStream
virtual ~InputStream () noexcept=default
 
- Public 成员函数 继承自 sese::io::PeekableStream
virtual ~PeekableStream ()=default
 

Protected 属性

const char * buffer = nullptr
 
size_t pos = 0
 
size_t cap = 0
 

额外继承的成员函数

- Public 类型 继承自 sese::io::InputStream
typedef std::shared_ptr< InputStreamPtr
 
- Public 类型 继承自 sese::io::PeekableStream
typedef std::shared_ptr< PeekableStreamPtr
 

详细描述

输入缓存包装器

构造及析构函数说明

◆ InputBufferWrapper()

sese::io::InputBufferWrapper::InputBufferWrapper ( const char * buffer,
size_t cap )

引用了 buffer , 以及 cap.

成员函数说明

◆ getBuffer()

const char * sese::io::InputBufferWrapper::getBuffer ( ) const
nodiscard

◆ getCapacity()

size_t sese::io::InputBufferWrapper::getCapacity ( ) const
nodiscard

◆ getLength()

size_t sese::io::InputBufferWrapper::getLength ( ) const
nodiscard

◆ peek()

int64_t sese::io::InputBufferWrapper::peek ( void * buffer,
size_t length )
overridevirtual

仅读取内容,不步进

参数
buffer缓存
length缓存大小
返回
实际读取大小

实现了 sese::io::PeekableStream.

◆ read()

int64_t sese::io::InputBufferWrapper::read ( void * buffer,
size_t length )
overridevirtual

◆ reset()

void sese::io::InputBufferWrapper::reset ( )
noexcept

◆ trunc()

int64_t sese::io::InputBufferWrapper::trunc ( size_t length)
overridevirtual

仅步进,不读取内容

参数
length步进大小
返回
实际步进大小

实现了 sese::io::PeekableStream.

类成员变量说明

◆ buffer

const char* sese::io::InputBufferWrapper::buffer = nullptr
protected

被这些函数引用 InputBufferWrapper().

◆ cap

size_t sese::io::InputBufferWrapper::cap = 0
protected

被这些函数引用 InputBufferWrapper().

◆ pos

size_t sese::io::InputBufferWrapper::pos = 0
protected

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