#pragma once
#include "Atom.hpp"
#include "Util.hpp"
#include <string>
#include "Metadata.hpp"

class LineParser
{
public:	
	LineParser(std::string line);
	std::string getRecordTypeName();
	RecordType getRecordType();
	int parseNUMMDL();
	int parseMODEL();
	Atom parseATOM();
	std::pair<int,std::vector<int>> parseCONECT();
	Header parseHeader(); 
	std::string parseKeywords();
	std::string parseTitle();
	std::string parseAuthor();
	std::string parseSource();
	std::string parseExpdata();

private:	
	std::string line;
	int getInteger(Limit limit);
	float getFloat(Limit limit);
	std::string noTrim(Limit limit);
	std::string trimLeft(Limit limit);
	std::string trimRight();
	std::string trimRight(Limit limit);

	int lastResSeq;
};