aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/StdInStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Common/StdInStream.h')
-rw-r--r--[-rwxr-xr-x]CPP/Common/StdInStream.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/CPP/Common/StdInStream.h b/CPP/Common/StdInStream.h
index 67ef82b..c017d0a 100755..100644
--- a/CPP/Common/StdInStream.h
+++ b/CPP/Common/StdInStream.h
@@ -1,29 +1,30 @@
// Common/StdInStream.h
-#ifndef __COMMON_STDINSTREAM_H
-#define __COMMON_STDINSTREAM_H
+#ifndef __COMMON_STD_IN_STREAM_H
+#define __COMMON_STD_IN_STREAM_H
#include <stdio.h>
#include "MyString.h"
-#include "Types.h"
+#include "MyTypes.h"
class CStdInStream
{
- bool _streamIsOpen;
FILE *_stream;
+ bool _streamIsOpen;
public:
- CStdInStream(): _streamIsOpen(false) {};
- CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {};
- ~CStdInStream();
- bool Open(LPCTSTR fileName);
- bool Close();
+ CStdInStream(): _stream(0), _streamIsOpen(false) {};
+ CStdInStream(FILE *stream): _stream(stream), _streamIsOpen(false) {};
+ ~CStdInStream() { Close(); }
+
+ bool Open(LPCTSTR fileName) throw();
+ bool Close() throw();
AString ScanStringUntilNewLine(bool allowEOF = false);
void ReadToString(AString &resultString);
UString ScanUStringUntilNewLine();
- bool Eof();
+ bool Eof() throw();
int GetChar();
};