add isEOF method
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 5 Jul 2008 04:41:13 +0000 (06:41 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 5 Jul 2008 04:41:13 +0000 (06:41 +0200)
FileReaderInput.cpp
FileReaderInput.h
ReaderInput.h

index 14fc0c6..bd08f13 100644 (file)
@@ -18,3 +18,7 @@ int FileReaderInput::read(void* buffer, size_t length) {
        readBytes = fread(buffer, 1, length, file);
        return 0;
 }
        readBytes = fread(buffer, 1, length, file);
        return 0;
 }
+
+bool FileReaderInput::isEOF() {
+       return feof(file);
+}
index 4188557..747440f 100644 (file)
@@ -14,6 +14,7 @@ public:
        ~FileReaderInput();
 
        int read(void* buffer, size_t length);
        ~FileReaderInput();
 
        int read(void* buffer, size_t length);
+       bool isEOF();
 
 private:
        FILE* file;
 
 private:
        FILE* file;
index ec84632..c16426e 100644 (file)
@@ -12,6 +12,7 @@ public:
        virtual ~ReaderInput();
 
        virtual int read(void* buffer, size_t length) = 0;
        virtual ~ReaderInput();
 
        virtual int read(void* buffer, size_t length) = 0;
+       virtual bool isEOF() = 0;
 
 };
 
 
 };