BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
sstream.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <fc/io/iostream.hpp>
3 #include <fc/fwd.hpp>
4 
5 namespace fc {
6 
7  class stringstream : virtual public iostream {
8  public:
9  stringstream();
10  stringstream( std::string& s);
11  stringstream( const std::string& s);
12  ~stringstream();
13 
14  std::string str();
15  void str(const std::string& s);
16 
17  void clear();
18 
19  virtual bool eof()const;
20  virtual size_t writesome( const char* buf, size_t len );
21  virtual size_t writesome( const std::shared_ptr<const char>& buf, size_t len, size_t offset );
22  virtual size_t readsome( char* buf, size_t len );
23  virtual size_t readsome( const std::shared_ptr<char>& buf, size_t len, size_t offset );
24  virtual void close();
25  virtual void flush();
26  char peek();
27 
28  private:
29  class impl;
30  fwd<impl, 392> my;
31  };
32 
33 }
fc::stringstream::peek
char peek()
Definition: sstream.cpp:79
fc::stringstream::clear
void clear()
Definition: sstream.cpp:41
fwd.hpp
fc
Definition: api.hpp:15
fc::stringstream::str
std::string str()
Definition: sstream.cpp:33
fc::stringstream::impl
Definition: sstream.cpp:8
fc::stringstream::eof
virtual bool eof() const
Definition: sstream.cpp:46
iostream.hpp
fc::stringstream::~stringstream
~stringstream()
Definition: sstream.cpp:30
fc::stringstream::writesome
virtual size_t writesome(const char *buf, size_t len)
Definition: sstream.cpp:49
fc::stringstream::stringstream
stringstream()
Definition: sstream.cpp:29
fc::stringstream::flush
virtual void flush()
Definition: sstream.cpp:77
fc::stringstream::close
virtual void close()
Definition: sstream.cpp:76
fc::stringstream
Definition: sstream.hpp:7
fc::stringstream::readsome
virtual size_t readsome(char *buf, size_t len)
Definition: sstream.cpp:62
fc::iostream
Definition: iostream.hpp:61
fc::fwd
Used to forward declare value types.
Definition: fwd.hpp:10