ref.h
Go to the documentation of this file.00001
00002 #ifndef REF_H
00003 #define REF_H
00004 #include <iostream>
00005 #include <string>
00006 #include <vector>
00007 #include "gberr.h"
00008
00009 #ifndef LINE
00010 #define LINE 83
00011 #endif
00012
00014 enum refType {normal, thesis, unpub, submit, inpres, patent, abnormal};
00015
00016 class jinfo
00017 {
00018 public:
00019 jinfo();
00020
00021
00022 int load(const string &jl) throw(gberr);
00023 void getYear(const string &jj);
00024
00025
00026 refType type;
00027
00028 string key() const;
00029 void clear();
00030
00031 friend class ref;
00032
00033 private:
00034 string jo;
00035 string vol;
00036 string iss;
00037 string pgb;
00038 string pge;
00039 string yr;
00040 string affil;
00041 };
00042
00043 class ref
00044 {
00045 public:
00046 ref() : auth(), titl(), jnl(), med(), pubmed() { }
00047
00048
00049
00050
00051 int read(istream &ins, string &ln);
00052
00053 int dump(ostream &seq, ostream &pap, ostream &aut);
00054 int writeProtein(ostream &seq, ostream &pap, ostream &aut);
00055 string key() const;
00056 string title() const { return titl; }
00057
00058 private:
00059 void clear();
00060
00061 void au2list();
00062 string fullName();
00063
00064 void rmSubmit();
00065
00066
00067 friend void rmAuthorPunc(string &s);
00068 friend void rmJournalDot(string &s);
00069
00070 string auth;
00071 string titl;
00072 string jnl;
00073 string med;
00074 string pubmed;
00075 string rmk;
00076 jinfo parsedJ;
00077 vector<string> authorList;
00078 };
00079
00080 #endif