// PdbFinderParser.hpp #if !defined(PDB_FINDER_PARSER_HPP) #define PDB_FINDER_PARSER_HPP #include #include #include "Parser.hpp" #include "Reader.hpp" namespace NGBW { struct PdbChain { std::string identity; std::string sequence; }; typedef std::vector ChainList; struct PdbFinderRecord { void clear() throw() { identity.clear(); organism.clear(); description.clear(); chains.clear(); } std::string identity; std::string organism; std::string description; ChainList chains; }; class PdbFinderParser : public Parser { public: PdbFinderParser(Reader &input) throw() : Parser(input) { } ~PdbFinderParser() throw() { } bool Parse(PdbFinderRecord &record); private: void ParseIdentity(PdbFinderRecord &record); void ParseHeader(PdbFinderRecord &record); void ParseSource(PdbFinderRecord &record); void ParseChain(PdbFinderRecord &record); void GetFieldValue(size_t offset, std::string &value); bool FindEndToken(); }; } // namespace NGBW #endif // PDB_FINDER_PARSER_HPP