From: David ‘Bombe’ Roden Date: Sat, 5 Jul 2008 04:41:13 +0000 (+0200) Subject: add isEOF method X-Git-Tag: 0.1~58 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c58ce13db33c45a3e321edabe3bda12f45829482;p=ecparse.git add isEOF method --- diff --git a/FileReaderInput.cpp b/FileReaderInput.cpp index 14fc0c6..bd08f13 100644 --- a/FileReaderInput.cpp +++ b/FileReaderInput.cpp @@ -18,3 +18,7 @@ int FileReaderInput::read(void* buffer, size_t length) { readBytes = fread(buffer, 1, length, file); return 0; } + +bool FileReaderInput::isEOF() { + return feof(file); +} diff --git a/FileReaderInput.h b/FileReaderInput.h index 4188557..747440f 100644 --- a/FileReaderInput.h +++ b/FileReaderInput.h @@ -14,6 +14,7 @@ public: ~FileReaderInput(); int read(void* buffer, size_t length); + bool isEOF(); private: FILE* file; diff --git a/ReaderInput.h b/ReaderInput.h index ec84632..c16426e 100644 --- a/ReaderInput.h +++ b/ReaderInput.h @@ -12,6 +12,7 @@ public: virtual ~ReaderInput(); virtual int read(void* buffer, size_t length) = 0; + virtual bool isEOF() = 0; };