|
scclib
Stable Cloud Computing C++ Library
|
Input stream wrapper for reader. More...
#include <iostream.h>


Public Member Functions | |
| InStream (Reader &, size_t=1024) | |
| Create reader stream. More... | |
| InStream (const std::shared_ptr< Reader > &, size_t=1024) | |
| Create reader stream. More... | |
| InStream ()=delete | |
| No default construct. | |
| InStream (const InStream &)=delete | |
| Copy construct not allowed. | |
| InStream & | operator= (const InStream &)=delete |
| Copy assign not allowed. | |
| InStream (InStream &&) | |
| Move construct. | |
| InStream & | operator= (InStream &&) |
| Move assign. | |
| void | read_reset (const std::shared_ptr< Reader > &) |
| std::shared_ptr< Reader > | read_shared () const |
| virtual size_t | recvbuf_size () const |
| Size of receive buffer. | |
| virtual void | recvbuf_size (size_t) |
| Resize the receive buffer. More... | |
| virtual std::string | recv_fail () const |
| Failure message from the input stream. More... | |
| void | clear (std::ios::iostate=std::ios::goodbit) |
Input stream wrapper for reader.
Makes Reader objects compatible with std::istream.
Definition at line 58 of file iostream.h.
| InStream::InStream | ( | Reader & | reader, |
| size_t | recv_buf_sz = 1024 |
||
| ) |
Create reader stream.
Does not assume ownership of object. Useful for temporary use, otherwise use the shared pointer form.
| reader | Reader. |
| recv_buf_sz | Size of receive buffer. Number of bytes to be buffered from the underlying reader. |
Definition at line 341 of file iostream.cc.
| InStream::InStream | ( | const std::shared_ptr< Reader > & | reader, |
| size_t | recv_buf_sz = 1024 |
||
| ) |
Create reader stream.
| reader | Reader shared pointer. |
| recv_buf_sz | Size of receive buffer. Number of bytes to be buffered from the underlying reader. |
Definition at line 348 of file iostream.cc.
|
virtual |
Failure message from the input stream.
When an exception is thrown during an underlying read, the exception value is set in recv_fail(), and the bad bit is set.
When a read returns 0, the eof bit is set.
Definition at line 419 of file iostream.cc.
|
virtual |
Resize the receive buffer.
Clears any data currently in the input buffer.
Definition at line 407 of file iostream.cc.