00001 00014 #ifndef _cMovie_h 00015 #define _cMovie_h 00016 00017 00018 00019 #include "TypesDef.h" // Int 00020 #include <string> 00021 using std::string; 00022 00023 //************************************* 00024 // Number assigned has to be in ORDER. 00025 //************************************* 00026 00027 const Int M_YEAR = 0 ; 00028 const Int M_MONTH = 1 ; 00029 const Int M_DAY = 2 ; 00030 const Int M_DIRECTOR = 3 ; 00031 const Int M_RUNTIME = 4 ; 00032 const Int M_COUNTRY = 5 ; 00033 const Int M_M_LANGUAGE = 6 ; 00034 const Int M_MPAA = 7 ; 00035 const Int M_CERTIFICATION = 8 ; 00036 const Int M_IMDB_URL = 9 ; 00037 const Int M_CASTNAME_CLIST = 10; 00038 const Int M_MD4 = 11; 00039 00040 const Int NUM_OF_MOVIE_DATA = 12; 00041 00042 class cMovie 00043 { 00044 00045 public: 00047 cMovie(void); 00048 00050 ~cMovie(void); 00051 00053 void Clear(void); 00054 00055 void SetData (string *sData); 00056 00057 //******************* 00058 // All Set Functions. 00059 //******************* 00060 void SetDate (string sDate); // set date string("yyyy-mm-dd") 00061 void SetDirector (string sDirector); 00062 void SetRuntime (string sRuntime); 00063 void SetCountry (string sCountry); 00064 void SetLanguage (string sLanguage); 00065 void SetMpaa (string sMpaa); 00066 void SetCertification(string sCertification); 00067 void SetImdbUrl (string sImdbUrl); 00068 void SetCastname (string sCastname); 00069 void SetMd4 (string sMd4); 00070 00071 const string *GetData (void) const; 00072 //******************* 00073 // All Get Functions. 00074 //******************* 00075 const string GetDate (void) const; // return const string("yyyy-mm-dd") 00076 const string GetDirector (void) const; 00077 const string GetRuntime (void) const; 00078 const string GetCountry (void) const; 00079 const string GetLanguage (void) const; 00080 const string GetMpaa (void) const; 00081 const string GetCertification(void) const; 00082 const string GetImdbUrl (void) const; 00083 const string GetCastname (void) const; 00084 const string GetMd4 (void) const; 00085 00086 protected: 00087 00088 private: 00089 string m_pMovieData[NUM_OF_MOVIE_DATA]; 00090 void SetDay (string sDay); 00091 void SetMonth (string sMonth); 00092 void SetYear (string sYear); 00093 00094 const string GetDay (void) const; 00095 const string GetMonth (void) const; 00096 const string GetYear (void) const; 00097 00098 }; 00099 00100 #endif // _cMovie_h