00001 #ifndef REFREADER_H 00002 #define REFREADER_H 00003 00004 //file: Refreader.h 00005 00006 #include <string> 00007 #include <iostream> 00008 #include "vref.h" 00009 00010 using namespace std; 00011 00021 class Refreader { 00022 public: 00026 Refreader() : medline(0), pubmed(0), remark(), consrtm(), authors(), title(), journal() {} 00027 Refreader(const Refreader &ref); 00028 Refreader& operator=(const Refreader &ref); 00029 void clear(); 00030 00037 bool next(istream &ins, string &ln); 00038 Ref* newRef() throw(gbreferr); // factory method to create a Ref object 00039 string toString() const; // for debug 00040 // for debug info 00041 friend ostream &operator<<(ostream &ou, const Refreader &ref); 00042 00043 private: 00044 string authors; // the original string format 00045 string consrtm; // rarely exist 00046 string title; 00047 string journal; 00048 int medline; // optional == 0 when not present 00049 int pubmed; // optional 00050 // trying to use integer to store the data 00051 string remark; // optional 00052 }; 00053 00054 #endif
1.5.6