// Parser.hpp #if !defined(PARSER_HPP) #define PARSER_HPP #include "Reader.hpp" namespace NGBW { class Parser { protected: Parser(Reader &input) throw() : m_input(input) { } Parser(Parser ©) throw() : m_line(copy.m_line), m_input(copy.m_input) { } virtual ~Parser() throw() { } void ReadNextLine() { if (m_input.Eof()) return; m_line = m_input.GetLine(); } size_t FindFirstOf(char value, size_t offset = 0); size_t FindFirstSpace(size_t offset = 0); size_t FindFirstNotSpace(size_t offset = 0); size_t FindLastNotSpace(size_t offset); size_t FindLastNotSpace(); size_t FindFirstDigit(size_t offset = 0); size_t FindFirstNotDigit(size_t offset = 0); const char *m_line; Reader &m_input; }; } // namespace NGBW #endif // PARSER_HPP