BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
stdio.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <fc/io/iostream.hpp>
3 
4 namespace fc
5 {
6 
7  class cout_t : virtual public ostream {
8  public:
9  virtual size_t writesome( const char* buf, size_t len );
10  virtual size_t writesome( const std::shared_ptr<const char>& buf, size_t len, size_t offset );
11  virtual void close();
12  virtual void flush();
13  };
14 
15  class cerr_t : virtual public ostream {
16  public:
17  virtual size_t writesome( const char* buf, size_t len );
18  virtual size_t writesome( const std::shared_ptr<const char>& buf, size_t len, size_t offset );
19  virtual void close();
20  virtual void flush();
21  };
22 
23  class cin_t : virtual public istream {
24  public:
25  ~cin_t();
26  virtual size_t readsome( char* buf, size_t len );
27  virtual size_t readsome( const std::shared_ptr<char>& buf, size_t len, size_t offset );
28  virtual istream& read( char* buf, size_t len );
29  virtual bool eof()const;
30  };
31 
32  extern cout_t& cout;
33  extern cerr_t& cerr;
34  extern cin_t& cin;
35 
36  extern std::shared_ptr<cin_t> cin_ptr;
37  extern std::shared_ptr<cout_t> cout_ptr;
38  extern std::shared_ptr<cerr_t> cerr_ptr;
39 }
fc::cerr_t::flush
virtual void flush()
Definition: iostream.cpp:100
fc::cin_t::~cin_t
~cin_t()
Definition: iostream.cpp:128
fc::cout_t::writesome
virtual size_t writesome(const char *buf, size_t len)
Definition: iostream.cpp:92
fc::cerr_t
Definition: stdio.hpp:15
fc::cout_t::close
virtual void close()
Definition: iostream.cpp:94
fc
Definition: api.hpp:15
fc::cin_t::read
virtual istream & read(char *buf, size_t len)
Definition: iostream.cpp:136
fc::cin_t
Definition: stdio.hpp:23
fc::cin
cin_t & cin
Definition: iostream.cpp:177
fc::cout
cout_t & cout
Definition: iostream.cpp:175
iostream.hpp
fc::cerr_t::close
virtual void close()
Definition: iostream.cpp:99
fc::ostream
Definition: iostream.hpp:41
fc::cerr
cerr_t & cerr
Definition: iostream.cpp:176
fc::istream
Definition: iostream.hpp:11
fc::cerr_t::writesome
virtual size_t writesome(const char *buf, size_t len)
Definition: iostream.cpp:97
fc::cin_t::readsome
virtual size_t readsome(char *buf, size_t len)
Definition: iostream.cpp:103
fc::cout_t::flush
virtual void flush()
Definition: iostream.cpp:95
fc::cerr_ptr
std::shared_ptr< cerr_t > cerr_ptr
Definition: iostream.cpp:174
fc::cin_t::eof
virtual bool eof() const
Definition: iostream.cpp:169
fc::cin_ptr
std::shared_ptr< cin_t > cin_ptr
Definition: iostream.cpp:172
fc::cout_ptr
std::shared_ptr< cout_t > cout_ptr
Definition: iostream.cpp:173
fc::cout_t
Definition: stdio.hpp:7