Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::io::OutputStream Class Referenceabstract

Stream output interface class. More...

#include <OutputStream.h>

Inheritance diagram for 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 Types

typedef std::shared_ptr< OutputStreamPtr
 

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)
 

Detailed Description

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

Member Typedef Documentation

◆ Ptr

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

Constructor & Destructor Documentation

◆ ~OutputStream()

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

Member Function Documentation

◆ write() [1/5]

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

References 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

References write().

◆ write() [5/5]

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

References write().


The documentation for this class was generated from the following files: