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

输入流缓存类 更多...

#include <BufferedInputStream.h>

类 sese::io::BufferedInputStream 继承关系图:
sese::io::InputStream

Public 类型

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

Public 成员函数

 BufferedInputStream (const InputStream::Ptr &source, size_t buffer_size=STREAM_BYTE_STREAM_SIZE_FACTOR)
 
 ~BufferedInputStream () noexcept override
 
int64_t read (void *buffer, size_t length) override
 
size_t getPosition () const
 
size_t getLength () const
 
size_t getCapacity () const
 
- Public 成员函数 继承自 sese::io::InputStream
virtual ~InputStream () noexcept=default
 

Private 成员函数

int64_t preRead () noexcept
 

Private 属性

InputStream::Ptr source
 
void * buffer = nullptr
 
size_t pos
 
size_t len
 
size_t cap
 

详细描述

输入流缓存类

成员类型定义说明

◆ Ptr

构造及析构函数说明

◆ BufferedInputStream()

BufferedInputStream::BufferedInputStream ( const InputStream::Ptr & source,
size_t buffer_size = STREAM_BYTE_STREAM_SIZE_FACTOR )
explicit

引用了 buffer, cap, len, pos , 以及 source.

◆ ~BufferedInputStream()

BufferedInputStream::~BufferedInputStream ( )
overridenoexcept

引用了 buffer , 以及 free().

成员函数说明

◆ getCapacity()

size_t sese::io::BufferedInputStream::getCapacity ( ) const
inlinenodiscard

引用了 cap.

◆ getLength()

size_t sese::io::BufferedInputStream::getLength ( ) const
inlinenodiscard

引用了 len.

◆ getPosition()

size_t sese::io::BufferedInputStream::getPosition ( ) const
inlinenodiscard

引用了 pos.

◆ preRead()

int64_t BufferedInputStream::preRead ( )
inlineprivatenoexcept

引用了 buffer, cap, len, pos, read() , 以及 source.

被这些函数引用 read().

◆ read()

int64_t BufferedInputStream::read ( void * buffer,
size_t length )
overridevirtual

实现了 sese::io::InputStream.

引用了 buffer, cap, len, pos, preRead(), read() , 以及 source.

被这些函数引用 preRead() , 以及 read().

类成员变量说明

◆ buffer

void* sese::io::BufferedInputStream::buffer = nullptr
private

被这些函数引用 BufferedInputStream(), preRead(), read() , 以及 ~BufferedInputStream().

◆ cap

size_t sese::io::BufferedInputStream::cap
private

被这些函数引用 BufferedInputStream(), getCapacity(), preRead() , 以及 read().

◆ len

size_t sese::io::BufferedInputStream::len
private

被这些函数引用 BufferedInputStream(), getLength(), preRead() , 以及 read().

◆ pos

size_t sese::io::BufferedInputStream::pos
private

被这些函数引用 BufferedInputStream(), getPosition(), preRead() , 以及 read().

◆ source

InputStream::Ptr sese::io::BufferedInputStream::source
private

被这些函数引用 BufferedInputStream(), preRead() , 以及 read().


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