#ifndef __pxx_text_stream_hh__
#define __pxx_text_stream_hh__

#include "pxx_stream.hh"

namespace pxx
{

class TextStream :
  public Stream
{

private:

  char buf[64] ;

public:

  inline TextStream (io_mode_t _mode) ;

  inline TextStream& operator << (char _c) ;
  inline TextStream& operator >> (char& _c) ;
  inline TextStream& operator << (wchar_t _wc) ;
  inline TextStream& operator >> (wchar_t& _wc) ;
  inline TextStream& operator << (int8_t _num) ;
  inline TextStream& operator >> (int8_t& _num) ;
  inline TextStream& operator << (uint8_t _num) ;
  inline TextStream& operator >> (uint8_t& _num) ;
  inline TextStream& operator << (int16_t _num) ;
  inline TextStream& operator >> (int16_t& _num) ;
  inline TextStream& operator << (uint16_t _num) ;
  inline TextStream& operator >> (uint16_t& _num) ;
  inline TextStream& operator << (int32_t _num) ;
  inline TextStream& operator >> (int32_t& _num) ;
  inline TextStream& operator << (uint32_t _num) ;
  inline TextStream& operator >> (uint32_t& _num) ;
  inline TextStream& operator << (int64_t _num) ;
  inline TextStream& operator >> (int64_t& _num) ;
  inline TextStream& operator << (uint64_t _num) ;
  inline TextStream& operator >> (uint64_t& _num) ;
  using Stream::operator << ;
  using Stream::operator >> ;

  inline TextStream& endl () ;

private:

  long read_long () ;
  long long read_llong () ;
  unsigned long read_ulong () ;
  unsigned long long read_ullong () ;

};

}

#endif // __pxx_text_stream_hh__
