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

流式输出接口类 更多...

#include <OutputStream.h>

类 sese::io::OutputStream 继承关系图:
sese::GZipFileOutputStream sese::_windows::iocp::v1::NativeContext sese::archive::ArchiveOutputStream sese::io::BufferedOutputStream sese::io::ConsoleOutputStream sese::io::NullOutputStream sese::io::OutputBufferWrapper sese::io::StdOutputStreamWrapper sese::io::Stream sese::iocp::v1::Context sese::net::http::Requestable

Public 类型

typedef std::shared_ptr< OutputStreamPtr
 

Public 成员函数

virtual ~OutputStream () noexcept=default
 
virtual int64_t write (const void *buffer, size_t length)=0
 
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)
 

详细描述

流式输出接口类

警告
支持写入 std::vector、std::array、std::span 等类型,但需要注意 T 是否为 POD 类型,非 POD 类型写入将会导致不可预期事件

成员类型定义说明

◆ Ptr

typedef std::shared_ptr<OutputStream> sese::io::OutputStream::Ptr

构造及析构函数说明

◆ ~OutputStream()

virtual sese::io::OutputStream::~OutputStream ( )
virtualdefaultnoexcept

成员函数说明

◆ write() [1/5]

int64_t sese::io::OutputStream::write ( const std::string_view & buffer)

引用了 write().

◆ write() [2/5]

int64_t sese::io::OutputStream::write ( const text::StringView & buffer)

◆ write() [3/5]

◆ write() [4/5]

template<typename T , size_t N>
int64_t sese::io::OutputStream::write ( std::array< T, N > & buffer)
inline

引用了 write().

◆ write() [5/5]

template<typename T >
int64_t sese::io::OutputStream::write ( std::vector< T > & buffer)
inline

引用了 write().


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