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

Standard library input wrapper stream. More...

#include <FakeStream.h>

Inheritance diagram for sese::io::StdInputStreamWrapper:
sese::io::InputStream sese::io::PeekableStream

Public Member Functions

 StdInputStreamWrapper (std::istream &stream)
 
int64_t read (void *buffer, size_t length) override
 
int64_t peek (void *buffer, size_t length) override
 
int64_t trunc (size_t length) override
 
- Public Member Functions inherited from sese::io::InputStream
virtual ~InputStream () noexcept=default
 
- Public Member Functions inherited from sese::io::PeekableStream
virtual ~PeekableStream ()=default
 

Private Attributes

std::istream & stream
 

Additional Inherited Members

- Public Types inherited from sese::io::InputStream
typedef std::shared_ptr< InputStreamPtr
 
- Public Types inherited from sese::io::PeekableStream
typedef std::shared_ptr< PeekableStreamPtr
 

Detailed Description

Standard library input wrapper stream.

Constructor & Destructor Documentation

◆ StdInputStreamWrapper()

sese::io::StdInputStreamWrapper::StdInputStreamWrapper ( std::istream & stream)
explicit

Member Function Documentation

◆ peek()

int64_t sese::io::StdInputStreamWrapper::peek ( void * buffer,
size_t length )
overridevirtual

Peek a certain number of bytes

Warning
This function is not recommended unless you fully understand what you are doing
See also
sese::StdOutputStreamWrapper::write
Parameters
bufferBuffer
lengthBuffer size
Returns
Actual size read

Implements sese::io::PeekableStream.

◆ read()

int64_t sese::io::StdInputStreamWrapper::read ( void * buffer,
size_t length )
overridevirtual

Implements sese::io::InputStream.

◆ trunc()

int64_t sese::io::StdInputStreamWrapper::trunc ( size_t length)
overridevirtual

Step a certain number of bytes

Warning
This function is not recommended unless you fully understand what you are doing
See also
sese::StdOutputStreamWrapper::write
Parameters
lengthStep size
Returns
Step size

Implements sese::io::PeekableStream.

Member Data Documentation

◆ stream

std::istream& sese::io::StdInputStreamWrapper::stream
private

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