1 /************************************************************************** 2 * Copyright (C) 2011-2019 by Michel Ludwig (michel.ludwig@kdemail.net) * 3 ***************************************************************************/ 4 5 /*************************************************************************** 6 * * 7 * This program is free software; you can redistribute it and/or modify * 8 * it under the terms of the GNU General Public License as published by * 9 * the Free Software Foundation; either version 2 of the License, or * 10 * (at your option) any later version. * 11 * * 12 ***************************************************************************/ 13 14 #ifndef BIBTEXPARSER_H 15 #define BIBTEXPARSER_H 16 17 #include <QLinkedList> 18 19 #include "documentinfo.h" 20 #include "kileconstants.h" 21 #include "kileextensions.h" 22 #include "parser.h" 23 24 namespace KileParser { 25 26 class BibTeXParserInput : public ParserInput 27 { 28 public: 29 BibTeXParserInput(const QUrl &url, QStringList textLines); 30 31 QStringList textLines; 32 }; 33 34 class BibTeXParserOutput : public ParserOutput { 35 public: 36 BibTeXParserOutput(); 37 virtual ~BibTeXParserOutput(); 38 39 QStringList bibItems; 40 }; 41 42 43 class BibTeXParser : public Parser 44 { 45 Q_OBJECT 46 47 public: 48 BibTeXParser(ParserThread *parserThread, BibTeXParserInput *input, QObject *parent = Q_NULLPTR); 49 virtual ~BibTeXParser(); 50 51 ParserOutput* parse() override; 52 53 protected: 54 QStringList m_textLines; 55 }; 56 57 } 58 59 #endif 60