BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | List of all members
fc::buffered_istream Class Reference

Reads data from an unbuffered stream and enables peek functionality. More...

#include <buffered_iostream.hpp>

Inheritance diagram for fc::buffered_istream:
fc::istream

Public Member Functions

 buffered_istream (istream_ptr is)
 
 buffered_istream (buffered_istream &&o)
 
buffered_istreamoperator= (buffered_istream &&i)
 
virtual ~buffered_istream ()
 
virtual std::size_t readsome (char *buf, std::size_t len)
 
virtual size_t readsome (const std::shared_ptr< char > &buf, size_t len, size_t offset)
 
virtual char peek () const
 
- Public Member Functions inherited from fc::istream
virtual ~istream ()
 
virtual size_t readsome (char *buf, size_t len)=0
 
istreamread (char *buf, size_t len)
 
istreamread (const std::shared_ptr< char > &buf, size_t len, size_t offset=0)
 
virtual char get ()
 
void get (char &c)
 

Detailed Description

Reads data from an unbuffered stream and enables peek functionality.

Definition at line 16 of file buffered_iostream.hpp.

Constructor & Destructor Documentation

fc::buffered_istream::buffered_istream ( istream_ptr  is)

Definition at line 32 of file buffered_iostream.cpp.

fc::buffered_istream::buffered_istream ( buffered_istream &&  o)

Definition at line 38 of file buffered_iostream.cpp.

fc::buffered_istream::~buffered_istream ( )
virtual

Definition at line 47 of file buffered_iostream.cpp.

Member Function Documentation

buffered_istream & fc::buffered_istream::operator= ( buffered_istream &&  i)

Definition at line 41 of file buffered_iostream.cpp.

char fc::buffered_istream::peek ( ) const
virtual

This method may block until at least 1 character is available.

Definition at line 112 of file buffered_iostream.cpp.

virtual std::size_t fc::buffered_istream::readsome ( char *  buf,
std::size_t  len 
)
virtual

read at least 1 byte or throw, if no data is available this method should block cooperatively until data is available or fc::eof_exception is thrown.

Precondition
len > 0
buf != nullptr
Exceptions
fc::eofif at least 1 byte cannot be read
size_t fc::buffered_istream::readsome ( const std::shared_ptr< char > &  buf,
size_t  len,
size_t  offset 
)
virtual

Implements fc::istream.

Definition at line 75 of file buffered_iostream.cpp.


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