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

Standard library output wrapper stream. More...

#include <FakeStream.h>

Inheritance diagram for sese::io::StdOutputStreamWrapper:
sese::io::OutputStream

Public Member Functions

 StdOutputStreamWrapper (std::ostream &stream)
 
int64_t write (const void *buffer, size_t length) override
 
- Public Member Functions inherited from 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 Attributes

std::ostream & stream
 
std::streamoff latest
 

Additional Inherited Members

- Public Types inherited from sese::io::OutputStream
typedef std::shared_ptr< OutputStreamPtr
 

Detailed Description

Standard library output wrapper stream.

Constructor & Destructor Documentation

◆ StdOutputStreamWrapper()

sese::io::StdOutputStreamWrapper::StdOutputStreamWrapper ( std::ostream & stream)
explicit

Member Function Documentation

◆ write()

int64_t sese::io::StdOutputStreamWrapper::write ( const void * buffer,
size_t length )
overridevirtual

Write buffer to the standard library input stream

Parameters
bufferBuffer to write
lengthBuffer size to write
Warning
Do not use this function unless you fully understand what you are doing. Ensure that the stream.tellp() you pass in is not -1, otherwise it will not return the actual number of bytes written correctly
Returns
Actual number of bytes written

Implements sese::io::OutputStream.

Member Data Documentation

◆ latest

std::streamoff sese::io::StdOutputStreamWrapper::latest
private

◆ stream

std::ostream& sese::io::StdOutputStreamWrapper::stream
private

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