Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 // Common/StdInStream.h
3 #ifndef __COMMON_STDINSTREAM_H
4 #define __COMMON_STDINSTREAM_H
6 #include <stdio.h>
8 #include "Common/String.h"
9 #include "Types.h"
11 class CStdInStream
12 {
13 bool _streamIsOpen;
14 FILE *_stream;
15 public:
16 CStdInStream(): _streamIsOpen(false) {};
17 CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {};
18 ~CStdInStream();
19 bool Open(LPCTSTR fileName);
20 bool Close();
22 AString ScanStringUntilNewLine();
23 void ReadToString(AString &resultString);
25 bool Eof();
26 int GetChar();
27 };
29 extern CStdInStream g_StdIn;
31 #endif