BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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 size_t readsome (char *buf, 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 ()
 
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

◆ buffered_istream() [1/2]

fc::buffered_istream::buffered_istream ( istream_ptr  is)

Definition at line 32 of file buffered_iostream.cpp.

◆ buffered_istream() [2/2]

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

Definition at line 38 of file buffered_iostream.cpp.

◆ ~buffered_istream()

fc::buffered_istream::~buffered_istream ( )
virtual

Definition at line 47 of file buffered_iostream.cpp.

Member Function Documentation

◆ operator=()

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

Definition at line 41 of file buffered_iostream.cpp.

◆ peek()

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.

◆ readsome() [1/2]

size_t fc::buffered_istream::readsome ( char *  buf,
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

Implements fc::istream.

Definition at line 49 of file buffered_iostream.cpp.

◆ readsome() [2/2]

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: