misc/libphysfs/lzma/CPP/Common/StdInStream.h
changeset 13881 99b265e0d1d0
parent 13880 5f819b90d479
child 13882 b172a5d40eee
equal deleted inserted replaced
13880:5f819b90d479 13881:99b265e0d1d0
     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