Reference.h

Go to the documentation of this file.
00001 #ifndef REFERENCE_H
00002 #define REFERENCE_H
00003 
00004 /* file: Reference.h
00005  * This file will replace the old ref.h gradually*/
00006 
00007 #include <string>
00008 #include <vector>
00009 #include <iostream>
00010 #include "gberr.h"
00011 #include <map>
00012 
00013 using namespace std;
00014 
00015 class Reference {
00016         public:
00017                 Reference() : authors(), editors(), patent(), year(0), pubmed(0),
00018                                                         medline(0) { }
00019                 Reference(const Reference &ref);
00020                 Reference& operator=(const Reference &ref);
00021 
00022                 void clear();
00023 
00024                 // return true if successful
00025                 bool read(istream &ins, string &ln) throw(gbreferr);
00026                 void writeAce(ostream &ous, ostream &pap) const;
00027                 string makeKey() const;  // expensive operation
00028                                          // cache the result
00029 
00030                 static void setCounter(int k) { counter = k; }
00031                 static int nextCounter() { return counter++; }
00032                 static void loadKey(const string &inf);
00033                 static void dumpKey(const string &ouf);
00034 
00035         private:
00036                 string title;
00037                 vector<string> authors;  // may be null if CONSRTM exists
00038                 int pubmed;  // long enough, avoid conversion
00039                 int medline; // storage v.s. conversion
00040                 string remark;
00041 
00042                 // journal information
00043                 string jname;  // journal name
00044                 string volume;  // holds Date if jname == Submitted
00045                 string issue;   
00046                 string page_begin;
00047                 string page_end;
00048                 int year;   // no computation, just use sring
00049 
00051                 string publisher;        // onely book records have this field
00052                 vector<string> editors;
00053                 string patent;  // publisher hold affiliation
00054                 /* when jname == Submitted
00055                  * publisher holds the content of affiliation
00056                  * and patent holds the date string
00057                  * */
00058 
00059                 static int counter;
00060                 static map<string, int> paperkey;
00061 
00062                 bool parseJournal(string &jl) throw (gbreferr);
00063                 /* writes the paper object only */
00064                 void write(ostream &ous) const;
00065 };
00066 
00067 /*
00068 class submission 
00069 {
00070         private:
00071                 vector<string> authors;
00072                 string consrtm;
00073                 // title == Direct Submission
00074                 string addr;
00075                 string date;
00076         public:
00077                 submission();
00078 };
00079 */
00080 
00081 #endif

Generated on Wed Aug 10 11:56:58 2011 for Softwares from Orpara by  doxygen 1.5.6