// NrParser.hpp #if !defined(NR_PARSER_HPP) #define NR_PARSER_HPP #include #include #include "FastaWriter.hpp" #include "Parser.hpp" #include "Reader.hpp" namespace NGBW { struct NrDefline { void clear() throw() { identity.clear(); database.clear(); description.clear(); } std::string identity; std::string database; std::string description; }; typedef std::vector DeflineList; struct NrFastaRecord { void clear() throw() { sequence.clear(); deflines.clear(); } std::string sequence; DeflineList deflines; }; class NrParser : public Parser { public: NrParser(Reader &input) throw() : Parser(input) { } ~NrParser() throw() { } bool Parse(NrFastaRecord &record); private: void ParseHeader(NrFastaRecord &record); void ParseDefline(size_t offset, size_t end, NrDefline &defline); }; } // namespace NGBW #endif // NR_PARSER_HPP