michael@0: // Common/StdOutStream.h michael@0: michael@0: #ifndef __COMMON_STDOUTSTREAM_H michael@0: #define __COMMON_STDOUTSTREAM_H michael@0: michael@0: #include michael@0: michael@0: #include "Types.h" michael@0: michael@0: class CStdOutStream michael@0: { michael@0: bool _streamIsOpen; michael@0: FILE *_stream; michael@0: public: michael@0: CStdOutStream (): _streamIsOpen(false) {}; michael@0: CStdOutStream (FILE *stream): _streamIsOpen(false), _stream(stream) {}; michael@0: ~CStdOutStream (); michael@0: bool Open(const char *fileName); michael@0: bool Close(); michael@0: bool Flush(); michael@0: michael@0: CStdOutStream & operator<<(CStdOutStream & (* aFunction)(CStdOutStream &)); michael@0: CStdOutStream & operator<<(const char *string); michael@0: CStdOutStream & operator<<(const wchar_t *string); michael@0: CStdOutStream & operator<<(char c); michael@0: CStdOutStream & operator<<(int number); michael@0: CStdOutStream & operator<<(UInt64 number); michael@0: }; michael@0: michael@0: CStdOutStream & endl(CStdOutStream & outStream); michael@0: michael@0: extern CStdOutStream g_StdOut; michael@0: extern CStdOutStream g_StdErr; michael@0: michael@0: #endif