"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2b/crJson.h" (12 Feb 2021, 1278 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 "crJson.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 CRJSON_H
    8 #define CRJSON_H
    9 
   10 #include "bibReference.h"
   11 
   12 
   13 class crJson
   14 {
   15 
   16 public:
   17     explicit crJson(const QString& json);
   18     inline ~crJson() {}
   19 
   20     inline const bibReference& reference() const
   21     {
   22         return _reference;
   23     }
   24     inline bool hasError() const
   25     {
   26         return _has_error;
   27     }
   28     inline QString errorString() const
   29     {
   30         return _error_string;
   31     }
   32 
   33 
   34 private:
   35     void readReference(const QString& json);
   36 
   37     static QString _bibtex_booktitle(const QStringList& titles);
   38     static QString _bibtex_series(const QStringList& titles);
   39     static QString _bibtex_title(const QStringList& titles, const QStringList& subtitles);
   40     static QString _normalize_jabstract(const QString& abstract);
   41     static int _words(const QString& s);
   42     static void _normalize_jtitles(QStringList* titles);
   43 
   44     QString _error_string;
   45     bibReference _reference;
   46     bool _has_error;
   47 };
   48 
   49 #endif