"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2b/journalDB.h" (12 Feb 2021, 1671 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 "journalDB.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 JOURNALDB_H
    8 #define JOURNALDB_H
    9 
   10 #include <QString>
   11 #include <QStringList>
   12 #include <QVarLengthArray>
   13 
   14 
   15 /**
   16     Database of Journal Names
   17 
   18     @author Pere Constans
   19 */
   20 class journalDB
   21 {
   22 
   23 public:
   24     explicit journalDB(const QString& dbfile);
   25     inline ~journalDB() {}
   26 
   27     QString retrieve(const QString& JQuery) const;
   28     QString retrieveAlternate(const QString& JQuery) const;
   29     QString retrieveAlternateFull(const QString& JQuery) const;
   30     QString retrieveFull(const QString& JQuery) const;
   31 
   32     inline int count() const
   33     {
   34         return _nitems;
   35     }
   36     inline const QString& retrieve(const int index) const
   37     {
   38         return JAbbrev.at(index);
   39     }
   40     inline const QString& retrieveFull(const int index) const
   41     {
   42         return JExtended.at(index);
   43     }
   44     inline const QString& fullsimplified(const int index) const
   45     {
   46         return JAbbrev_simp.at(index);
   47     }
   48     inline const QString& fullsimplifiedFull(const int index) const
   49     {
   50         return JExtended_simp.at(index);
   51     }
   52     inline const QStringList& abbreviatedList() const
   53     {
   54         return JAbbrev;
   55     }
   56 
   57 
   58 private:
   59     QStringList JAbbrev;
   60     QStringList JCode;
   61     QStringList JExtended;
   62     QVarLengthArray<QString> JAbbrev_simp;
   63     QVarLengthArray<QString> JExtended_simp;
   64     int _nitems;
   65 };
   66 
   67 #endif