#ifndef __pxx_stream_ih__ #define __pxx_stream_ih__ #include "pxx_stream.hh" #include #include namespace pxx { inline Stream::Stream ( io_mode_t _mode ) : mode (_mode), eof (false) {} inline Stream::~Stream () {} ; inline Stream::operator bool () { return !eof; } inline Stream& Stream::operator << (char* _s) { size_t n = strlen(_s); while (n--) self << *_s++; return self; } inline Stream& Stream::operator << (wchar_t* _s) { size_t n = wcslen(_s); while (n--) self << (uint32_t)*_s++; return self; } inline Stream& Stream::operator << (Stream& (*pf)(Stream&)) { return (*pf)(self); } inline Stream& flush (Stream& _s) { return _s.flush(); } inline Stream& endl (Stream& _s) { return _s.endl(); } } #endif // __pxx_stream_ih__