/* Starshatter: The Open Source Project Copyright (c) 2021-2022, Starshatter: The Open Source Project Contributors Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors Copyright (c) 1997-2006, Destroyer Studios LLC. AUTHOR: John DiCamillo OVERVIEW ======== Declaration of the Reader class */ #ifndef Reader_h #define Reader_h #include "Text.h" class Reader { public: Reader() { } virtual ~Reader() { } virtual Text more() = 0; }; class ConsoleReader : public Reader { public: virtual Text more() override; void printPrimaryPrompt(); void fillInputBuffer(); private: char buffer[1000]; char* p; }; class FileReader : public Reader { public: FileReader(const char* fname); virtual Text more() override; private: Text filename; int done; }; class BlockReader : public Reader { public: BlockReader(const char* block); BlockReader(const char* block, int len); virtual Text more(); private: char* data; int done; int length; }; #endif // Reader_h