"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2b/document.h" (12 Feb 2021, 1299 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 "document.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 DOCUMENT_H
    8 #define DOCUMENT_H
    9 
   10 #include <QString>
   11 
   12 /**
   13     This class converts documents to unicode strings
   14 */
   15 class document
   16 {
   17 
   18 public:
   19     enum Conversion
   20     {
   21         FirstPage,
   22         Complete
   23     };
   24 
   25     document(const QString& fn, const Conversion mode);
   26     inline ~document() {}
   27 
   28     QString fileToString(const QString& fn);
   29     QString toString();
   30     void setConverter(const Conversion mode);
   31 
   32     inline QString errorString() const
   33     {
   34         return _error_string.trimmed();
   35     }
   36     inline QString logString() const
   37     {
   38         return _log_string.trimmed();
   39     }
   40 
   41     static QString& normalize(QString& doc, const Conversion mode);
   42 
   43 private:
   44     Conversion _conversion_mode;
   45     QString _converter_arg;
   46     QString _converter_bin;
   47     QString _converter_output;
   48     QString _document_fn;
   49     QString _error_string;
   50     QString _log_string;
   51     void setConverter(const QString& bin, const QString& args);
   52 };
   53 
   54 #endif