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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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

mercurial