michael@0: // Common/StdInStream.h michael@0: michael@0: #ifndef __COMMON_STDINSTREAM_H michael@0: #define __COMMON_STDINSTREAM_H michael@0: michael@0: #include michael@0: michael@0: #include "Common/String.h" michael@0: #include "Types.h" michael@0: michael@0: class CStdInStream michael@0: { michael@0: bool _streamIsOpen; michael@0: FILE *_stream; michael@0: public: michael@0: CStdInStream(): _streamIsOpen(false) {}; michael@0: CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {}; michael@0: ~CStdInStream(); michael@0: bool Open(LPCTSTR fileName); michael@0: bool Close(); michael@0: michael@0: AString ScanStringUntilNewLine(); michael@0: void ReadToString(AString &resultString); michael@0: michael@0: bool Eof(); michael@0: int GetChar(); michael@0: }; michael@0: michael@0: extern CStdInStream g_StdIn; michael@0: michael@0: #endif