00001 #ifndef REFERENCE_H 00002 #define REFERENCE_H 00003 00004 #include <string> 00005 #include <vector> 00006 00007 using namesapce std; 00008 00009 class journal { 00010 public: 00011 journal(); 00012 journal(const journal &jo); 00013 journal& operator=(const journal &jo); 00014 00015 /* if correctly parsed the string, return true 00016 * return false if faile to parse the string 00017 * A lot of journal formats are very strange, just 00018 * discard these junk. They are not useful anyway. 00019 */ 00020 bool parse(string &str); 00021 00022 private: 00023 friend class reference; 00024 string name; 00025 string volume; 00026 string issue; // more not be numerical! 00027 string page_begin; 00028 string page_end; 00029 int year; 00030 }; 00031 00032 class reference { 00033 public: 00034 reference(); 00035 reference(const reference &ref); 00036 reference& operator=(const reference &ref); 00037 void clear(); 00038 00039 // return true if successful 00040 bool reead(istream &ins, string &ln); 00041 00042 private: 00043 string title; 00044 vector<string> authors; 00045 journal jo; 00046 int pubmed; 00047 int medline; 00048 string remark; 00049 }; 00050 00051 #endif
1.5.6