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

输出流缓存类 更多...

#include <BufferedOutputStream.h>

类 sese::io::BufferedOutputStream 继承关系图:
sese::io::OutputStream

Public 类型

using Ptr = std::shared_ptr<BufferedOutputStream>
 
- Public 类型 继承自 sese::io::OutputStream
typedef std::shared_ptr< OutputStreamPtr
 

Public 成员函数

 BufferedOutputStream (const OutputStream::Ptr &source, size_t buffer_size=STREAM_BYTE_STREAM_SIZE_FACTOR)
 
 ~BufferedOutputStream () noexcept override
 
int64_t write (const void *buffer, size_t length) override
 
int64_t flush () noexcept
 
size_t getPosition () const
 
size_t getLength () const
 
size_t getCapacity () const
 
- Public 成员函数 继承自 sese::io::OutputStream
virtual ~OutputStream () noexcept=default
 
int64_t write (const std::string_view &buffer)
 
int64_t write (const text::StringView &buffer)
 
template<typename T >
int64_t write (std::vector< T > &buffer)
 
template<typename T , size_t N>
int64_t write (std::array< T, N > &buffer)
 

Private 属性

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

详细描述

输出流缓存类

成员类型定义说明

◆ Ptr

构造及析构函数说明

◆ BufferedOutputStream()

BufferedOutputStream::BufferedOutputStream ( const OutputStream::Ptr & source,
size_t buffer_size = STREAM_BYTE_STREAM_SIZE_FACTOR )
explicit

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

◆ ~BufferedOutputStream()

BufferedOutputStream::~BufferedOutputStream ( )
overridenoexcept

引用了 buffer , 以及 free().

成员函数说明

◆ flush()

int64_t BufferedOutputStream::flush ( )
noexcept

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

被这些函数引用 write().

◆ getCapacity()

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

引用了 cap.

◆ getLength()

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

引用了 len.

◆ getPosition()

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

引用了 pos.

◆ write()

int64_t BufferedOutputStream::write ( const void * buffer,
size_t length )
overridevirtual

实现了 sese::io::OutputStream.

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

类成员变量说明

◆ buffer

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

◆ cap

size_t sese::io::BufferedOutputStream::cap
private

被这些函数引用 BufferedOutputStream(), getCapacity() , 以及 write().

◆ len

size_t sese::io::BufferedOutputStream::len
private

被这些函数引用 BufferedOutputStream(), flush(), getLength() , 以及 write().

◆ pos

size_t sese::io::BufferedOutputStream::pos
private

被这些函数引用 BufferedOutputStream(), flush(), getPosition() , 以及 write().

◆ source

OutputStream::Ptr sese::io::BufferedOutputStream::source
private

被这些函数引用 BufferedOutputStream(), flush() , 以及 write().


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