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

静态资源流 更多...

#include <ResourceStream.h>

类 sese::res::ResourceStream 继承关系图:
sese::io::PeekableStream sese::io::InputStream

Public 类型

using Ptr = std::unique_ptr<ResourceStream>
 
- Public 类型 继承自 sese::io::PeekableStream
typedef std::shared_ptr< PeekableStreamPtr
 
- Public 类型 继承自 sese::io::InputStream
typedef std::shared_ptr< InputStreamPtr
 

Public 成员函数

 ResourceStream (const void *buf, size_t size)
 
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
 
int64_t getSeek () const
 
int32_t setSeek (int64_t offset, io::Seek seek)
 
int32_t setSeek (int64_t offset, int32_t whence)
 
size_t getSize () const
 
- Public 成员函数 继承自 sese::io::PeekableStream
virtual ~PeekableStream ()=default
 
- Public 成员函数 继承自 sese::io::InputStream
virtual ~InputStream () noexcept=default
 

Protected 属性

const void * buf {}
 
size_t size {}
 
size_t pos {}
 

详细描述

静态资源流

成员类型定义说明

◆ Ptr

构造及析构函数说明

◆ ResourceStream()

sese::res::ResourceStream::ResourceStream ( const void * buf,
size_t size )

成员函数说明

◆ getSeek()

int64_t sese::res::ResourceStream::getSeek ( ) const
nodiscard

◆ getSize()

size_t sese::res::ResourceStream::getSize ( ) const
inlinenodiscard

引用了 size.

◆ peek()

int64_t sese::res::ResourceStream::peek ( void * buffer,
size_t length )
overridevirtual

仅读取内容,不步进

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

实现了 sese::io::PeekableStream.

◆ read()

int64_t sese::res::ResourceStream::read ( void * buffer,
size_t length )
overridevirtual

◆ setSeek() [1/2]

int32_t sese::res::ResourceStream::setSeek ( int64_t offset,
int32_t whence )

◆ setSeek() [2/2]

int32_t sese::res::ResourceStream::setSeek ( int64_t offset,
io::Seek seek )

◆ trunc()

int64_t sese::res::ResourceStream::trunc ( size_t length)
overridevirtual

仅步进,不读取内容

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

实现了 sese::io::PeekableStream.

类成员变量说明

◆ buf

const void* sese::res::ResourceStream::buf {}
protected

◆ pos

size_t sese::res::ResourceStream::pos {}
protected

◆ size

size_t sese::res::ResourceStream::size {}
protected

被这些函数引用 getSize().


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