"Fossies" - the Fresh Open Source Software Archive 
Member "cb2bib-2.0.1/src/c2b/bibExtractor.h" (12 Feb 2021, 1736 Bytes) of package /linux/privat/cb2bib-2.0.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "bibExtractor.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
2.0.0_vs_2.0.1.
1 /***************************************************************************
2 * Copyright (C) 2004-2021 by Pere Constans
3 * constans@molspaces.com
4 * cb2Bib version 2.0.1. Licensed under the GNU GPL version 3.
5 * See the LICENSE file that comes with this distribution.
6 ***************************************************************************/
7 #ifndef BIBEXTRACTOR_H
8 #define BIBEXTRACTOR_H
9
10 #include <QObject>
11
12
13 class bibParser;
14 class metadataParser;
15 class networkQuery;
16 class settings;
17
18 class QEventLoop;
19 class QTextStream;
20
21
22 /**
23 Wrapper class for handling the whole bibliographic extraction/recognition
24 process.
25 */
26 class bibExtractor : public QObject
27 {
28
29 Q_OBJECT
30
31 public:
32 explicit bibExtractor(QObject* parento = 0);
33 bibExtractor(bibParser* bp, metadataParser* mp, networkQuery* nq, QObject* parento = 0);
34 ~bibExtractor();
35
36 enum InputType
37 {
38 PlainText,
39 Document
40 };
41
42 int extract(const QString& text, QString* bibtex);
43 int extract(const QStringList& input_fns, const QString& output_fn, const InputType& type);
44
45
46 private:
47 InputType _input_type;
48 QEventLoop* _event_loop;
49 QString _document_fn;
50 QString documentToString(const QString& fn) const;
51 QTextStream& cout;
52 bibParser* _bpP;
53 bool _is_copymove_ok;
54 bool isReliable() const;
55 metadataParser* _mpP;
56 networkQuery* _networkQP;
57 settings* _settingsP;
58 void _extract(const QString& text);
59 void extract(const QString& text);
60 void init();
61
62
63 private slots:
64 void copyMoveEnded(bool ok);
65 void logMessage(const QString& ms) const;
66 void proxyLogMessage() const;
67 void queryEnded(bool succeeded, const QString& targetPDF, const QString& targetBib);
68 };
69
70 #endif