Upload 2.0.2
[physicsfs] / lzma / CPP / Common / StdInStream.h
1 // Common/StdInStream.h
2
3 #ifndef __COMMON_STDINSTREAM_H
4 #define __COMMON_STDINSTREAM_H
5
6 #include <stdio.h>
7
8 #include "MyString.h"
9 #include "Types.h"
10
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();
21
22   AString ScanStringUntilNewLine();
23   void ReadToString(AString &resultString);
24
25   bool Eof();
26   int GetChar();
27 };
28
29 extern CStdInStream g_StdIn;
30
31 #endif