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

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

mercurial