00001 00014 #ifndef _cFile_h 00015 #define _cFile_h 00016 00017 00018 00019 #include "TypesDef.h" // Int 00020 #include <string> 00021 00022 using std::string; 00023 00024 //************************************* 00025 // Number assigned has to be in ORDER. 00026 //************************************* 00027 const Int F_YEAR = 0 ; 00028 const Int F_MONTH = 1 ; 00029 const Int F_DAY = 2 ; 00030 const Int F_CD_NUM = 3 ; 00031 const Int F_FILENAME = 4 ; 00032 const Int F_SIZE = 5 ; 00033 const Int F_MD4 = 6 ; 00034 const Int F_PRIORITY = 7 ; 00035 const Int F_AVAILABILITY = 8 ; 00036 const Int F_COMMENT = 9 ; 00037 const Int F_DONE = 10; 00038 const Int F_CATEGORY = 11; 00039 const Int F_STORING = 12; 00040 const Int F_POSTER = 13; 00041 00042 const Int NUM_OF_FILE_DATA = 14; 00043 00044 class cFile 00045 { 00046 public: 00048 cFile(void); 00049 00051 ~cFile(void); 00052 00054 void Clear(void); 00055 00056 00057 void SetData (string *sData); 00058 //******************* 00059 // All Set Functions. 00060 //******************* 00062 void SetDate (string sDate); 00063 void SetCdNum (string sCdNum); 00064 void SetFilename (string sFilename); 00065 void SetSize (string sSize); 00066 void SetMd4 (string sMd4); 00067 void SetPriority (string sPriority); 00068 void SetAvailability(string sAvailability); 00069 void SetComment (string sComment); 00070 void SetDone (string sDone); 00071 void SetCategory (string sCategory); 00072 void SetStoring (string sStoring); 00073 void SetPoster (string sPoster); 00074 00075 const string *GetData (void) const; 00076 //******************* 00077 // All Get Functions. 00078 //******************* 00079 const string GetDate (void) const; // return const string("yyyy-mm-dd") 00080 const string GetCdNum (void) const; 00081 const string GetFilename (void) const; 00082 const string GetSize (void) const; 00083 const string GetMd4 (void) const; 00084 const string GetPriority (void) const; 00085 const string GetAvailability(void) const; 00086 const string GetComment (void) const; 00087 const string GetDone (void) const; 00088 const string GetCategory (void) const; 00089 const string GetStoring (void) const; 00090 const string GetPoster (void) const; 00091 00092 protected: 00093 00094 private: 00095 string m_pFileData[NUM_OF_FILE_DATA]; 00096 void SetDay (string sDay); 00097 void SetMonth (string sMonth); 00098 void SetYear (string sYear); 00099 00100 const string GetDay (void) const; 00101 const string GetMonth (void) const; 00102 const string GetYear (void) const; 00103 00104 }; 00105 00106 #endif // _cFile_h