流式输出接口类
更多...
#include <OutputStream.h>
|
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
◆ ~OutputStream()
virtual sese::io::OutputStream::~OutputStream |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ write() [1/5]
int64_t sese::io::OutputStream::write |
( |
const std::string_view & | buffer | ) |
|
◆ write() [2/5]
◆ write() [3/5]
virtual int64_t sese::io::OutputStream::write |
( |
const void * | buffer, |
|
|
size_t | length ) |
|
pure virtual |
在 sese::_windows::iocp::v1::NativeContext, sese::archive::ArchiveOutputStream, sese::GZipFileOutputStream, sese::internal::net::http::HttpClientImpl, sese::internal::net::http::HttpSSLClientImpl, sese::io::AbstractByteBuffer, sese::io::AbstractFixedBuffer, sese::io::BufferedOutputStream, sese::io::BufferedStream, sese::io::ByteBuffer, sese::io::ConsoleOutputStream, sese::io::FakeStream< T >, sese::io::FileStream, sese::io::FixedBuffer, sese::io::NullOutputStream, sese::io::OutputBufferWrapper, sese::io::StdOutputStreamWrapper, sese::iocp::v1::Context, sese::net::http::Requestable, sese::net::Socket , 以及 sese::security::SecuritySocket 内被实现.
被这些函数引用 sese::Base64Converter::decode(), sese::PercentConverter::decode(), sese::Compressor::deflate(), sese::Base64Converter::encode(), sese::PercentConverter::encode(), sese::Decompressor::inflate(), sese::Exception::printStacktrace(), sese::internal::net::http::HttpClientImpl::readBodyByData(), sese::Json::streamifyArray(), sese::Yaml::streamifyArray(), sese::Json::streamifyBasic(), sese::Json::streamifyObject(), sese::Yaml::streamifyObject(), write(), write(), write() , 以及 sese::archive::ArchiveWriter::writeCallback().
◆ write() [4/5]
template<typename T , size_t N>
int64_t sese::io::OutputStream::write |
( |
std::array< T, N > & | buffer | ) |
|
|
inline |
◆ write() [5/5]
template<typename T >
int64_t sese::io::OutputStream::write |
( |
std::vector< T > & | buffer | ) |
|
|
inline |
该类的文档由以下文件生成: