BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Public Member Functions | List of all members
fc::stringstream Class Reference

#include <sstream.hpp>

Inheritance diagram for fc::stringstream:
fc::iostream fc::ostream fc::istream

Classes

class  impl
 

Public Member Functions

 stringstream ()
 
 stringstream (std::string &s)
 
 stringstream (const std::string &s)
 
 ~stringstream ()
 
std::string str ()
 
void str (const std::string &s)
 
void clear ()
 
virtual bool eof () const
 
virtual size_t writesome (const char *buf, size_t len)
 
virtual size_t writesome (const std::shared_ptr< const char > &buf, size_t len, size_t offset)
 
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 void close ()
 
virtual void flush ()
 
char peek ()
 
- Public Member Functions inherited from fc::ostream
virtual ~ostream ()
 
void put (char c)
 
ostreamwrite (const char *buf, size_t len)
 
ostreamwrite (const std::shared_ptr< const char > &buf, size_t len, size_t offset=0)
 
- 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

Definition at line 7 of file sstream.hpp.

Constructor & Destructor Documentation

◆ stringstream() [1/3]

fc::stringstream::stringstream ( )

Definition at line 29 of file sstream.cpp.

◆ stringstream() [2/3]

fc::stringstream::stringstream ( std::string &  s)

Definition at line 23 of file sstream.cpp.

◆ stringstream() [3/3]

fc::stringstream::stringstream ( const std::string &  s)

Definition at line 26 of file sstream.cpp.

◆ ~stringstream()

fc::stringstream::~stringstream ( )

Definition at line 30 of file sstream.cpp.

Member Function Documentation

◆ clear()

void fc::stringstream::clear ( )

Definition at line 41 of file sstream.cpp.

◆ close()

void fc::stringstream::close ( )
virtual

Implements fc::ostream.

Definition at line 76 of file sstream.cpp.

◆ eof()

bool fc::stringstream::eof ( ) const
virtual

Definition at line 46 of file sstream.cpp.

◆ flush()

void fc::stringstream::flush ( )
virtual

Implements fc::ostream.

Definition at line 77 of file sstream.cpp.

◆ peek()

char fc::stringstream::peek ( )

Definition at line 79 of file sstream.cpp.

◆ readsome() [1/2]

size_t fc::stringstream::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 is thrown.

Exceptions
fc::eofif at least 1 byte cannot be read

Implements fc::istream.

Definition at line 62 of file sstream.cpp.

◆ readsome() [2/2]

size_t fc::stringstream::readsome ( const std::shared_ptr< char > &  buf,
size_t  len,
size_t  offset 
)
virtual

Implements fc::istream.

Definition at line 70 of file sstream.cpp.

◆ str() [1/2]

std::string fc::stringstream::str ( )

Definition at line 33 of file sstream.cpp.

◆ str() [2/2]

void fc::stringstream::str ( const std::string &  s)

Definition at line 37 of file sstream.cpp.

◆ writesome() [1/2]

size_t fc::stringstream::writesome ( const char *  buf,
size_t  len 
)
virtual

Implements fc::ostream.

Definition at line 49 of file sstream.cpp.

◆ writesome() [2/2]

size_t fc::stringstream::writesome ( const std::shared_ptr< const char > &  buf,
size_t  len,
size_t  offset 
)
virtual

Implements fc::ostream.

Definition at line 57 of file sstream.cpp.


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