
#ifndef TINYSTL_IOSTREAM
#define TINYSTL_IOSTREAM

// fread/fwrite
#include <stdio.h>

#include <istream>
#include <ostream>

namespace std {
  
  // TODO: a lot
  
  class basic_iostream : public istream, public ostream
  {
  public:
    basic_iostream (basic_streambuf* sb)
    {
      // TODO: streambuf = sb;
    }
    
    virtual ~basic_iostream() {}
  };
  
  typedef basic_iostream iostream;
  
  inline ostream& endl (ostream& os) {
    os.put ('\n');
    os.flush();
    return os;
  }
  
  inline ostream& ends(ostream& os) {
    return os;
  }
  
  inline ostream& flush(ostream& os) {
    return os;
  }

  extern istream cin; // Linked to standard input
  extern ostream cout; // Linked to standard output
  extern ostream cerr; // Linked to standard error (unbuffered)
  extern ostream clog; // Linked to standard error (buffered)
  
  /* TODO:
  //  extern wistream  wcin;
  //  extern wostream  wcout;
  //  extern wostream  wcerr;
  //  extern wostream  wclog;
  */
}

#endif // TINYSTL_IOSTREAM
