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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/other-licenses/7zstub/src/Common/StdInStream.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +// Common/StdInStream.h
     1.5 +
     1.6 +#ifndef __COMMON_STDINSTREAM_H
     1.7 +#define __COMMON_STDINSTREAM_H
     1.8 +
     1.9 +#include <stdio.h>
    1.10 +
    1.11 +#include "Common/String.h"
    1.12 +#include "Types.h"
    1.13 +
    1.14 +class CStdInStream 
    1.15 +{
    1.16 +  bool _streamIsOpen;
    1.17 +  FILE *_stream;
    1.18 +public:
    1.19 +  CStdInStream(): _streamIsOpen(false) {};
    1.20 +  CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {};
    1.21 +  ~CStdInStream();
    1.22 +  bool Open(LPCTSTR fileName);
    1.23 +  bool Close();
    1.24 +
    1.25 +  AString ScanStringUntilNewLine();
    1.26 +  void ReadToString(AString &resultString);
    1.27 +
    1.28 +  bool Eof();
    1.29 +  int GetChar();
    1.30 +};
    1.31 +
    1.32 +extern CStdInStream g_StdIn;
    1.33 +
    1.34 +#endif

mercurial