Sese Framework
2.3.0
A cross-platform framework
|
Stream output interface class. More...
#include <OutputStream.h>
Public Types | |
typedef std::shared_ptr< OutputStream > | Ptr |
Public Member Functions | |
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) |
Stream output interface class.
Supports writing to std::vector, std::array, std::span, etc., but be cautious about whether T is a POD type. Writing non-POD types may lead to unexpected events
typedef std::shared_ptr<OutputStream> sese::io::OutputStream::Ptr |
|
virtualdefaultnoexcept |
int64_t sese::io::OutputStream::write | ( | const std::string_view & | buffer | ) |
References write().
int64_t sese::io::OutputStream::write | ( | const text::StringView & | buffer | ) |
References sstr::SStringView::data(), sstr::SStringView::size(), and write().
|
pure virtual |
Implemented in 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, and sese::security::SecuritySocket.
Referenced by 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(), write(), write(), write(), and sese::archive::ArchiveWriter::writeCallback().
|
inline |
References write().
|
inline |
References write().