BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface 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 }
Used to forward declare value types.
Definition: fwd.hpp:10
std::string str()
Definition: sstream.cpp:33
virtual bool eof() const
Definition: sstream.cpp:46
virtual void flush()
Definition: sstream.cpp:77
virtual void close()
Definition: sstream.cpp:76
virtual size_t readsome(char *buf, size_t len)
Definition: sstream.cpp:62
Definition: api.hpp:15
virtual size_t writesome(const char *buf, size_t len)
Definition: sstream.cpp:49