other-licenses/7zstub/src/Common/StdOutStream.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Common/StdOutStream.h
michael@0 2
michael@0 3 #ifndef __COMMON_STDOUTSTREAM_H
michael@0 4 #define __COMMON_STDOUTSTREAM_H
michael@0 5
michael@0 6 #include <stdio.h>
michael@0 7
michael@0 8 #include "Types.h"
michael@0 9
michael@0 10 class CStdOutStream
michael@0 11 {
michael@0 12 bool _streamIsOpen;
michael@0 13 FILE *_stream;
michael@0 14 public:
michael@0 15 CStdOutStream (): _streamIsOpen(false) {};
michael@0 16 CStdOutStream (FILE *stream): _streamIsOpen(false), _stream(stream) {};
michael@0 17 ~CStdOutStream ();
michael@0 18 bool Open(const char *fileName);
michael@0 19 bool Close();
michael@0 20 bool Flush();
michael@0 21
michael@0 22 CStdOutStream & operator<<(CStdOutStream & (* aFunction)(CStdOutStream &));
michael@0 23 CStdOutStream & operator<<(const char *string);
michael@0 24 CStdOutStream & operator<<(const wchar_t *string);
michael@0 25 CStdOutStream & operator<<(char c);
michael@0 26 CStdOutStream & operator<<(int number);
michael@0 27 CStdOutStream & operator<<(UInt64 number);
michael@0 28 };
michael@0 29
michael@0 30 CStdOutStream & endl(CStdOutStream & outStream);
michael@0 31
michael@0 32 extern CStdOutStream g_StdOut;
michael@0 33 extern CStdOutStream g_StdErr;
michael@0 34
michael@0 35 #endif

mercurial