00001 00014 #ifndef _cSoftware_h 00015 #define _cSoftware_h 00016 00017 #include "TypesDef.h" // Int 00018 00019 #include <string> 00020 using std::string; 00021 00022 //************************************************ 00023 // Number assigned has to be in ORDER. 00024 // Order similar to description of cSoftwareWidget.h. 00025 //************************************************ 00026 00027 const Int SO_YEAR = 0 ; 00028 const Int SO_MONTH = 1 ; 00029 const Int SO_DAY = 2 ; 00030 const Int SO_VERSION = 3 ; 00031 const Int SO_LANGUAGE = 4 ; 00032 const Int SO_COMPANY = 5 ; 00033 const Int SO_URL = 6 ; 00034 const Int SO_DESCRIPTION= 7 ; 00035 const Int SO_MD4 = 8 ; 00036 00037 const Int NUM_OF_SOFTWARE_DATA = 9; 00038 00039 00040 class cSoftware 00041 { 00042 00043 public: 00045 cSoftware(void); 00046 00048 ~cSoftware(void); 00049 00051 void Clear(void); 00052 00053 void SetData (const string *sData); 00054 00055 //******************* 00056 // All Set Functions. 00057 //******************* 00058 void SetDate (const string sDate); // set date string("yyyy-mm-dd") 00059 void SetVersion (const string sVersion ); 00060 void SetLanguage (const string sLanguage ); 00061 void SetCompany (const string sCompany ); 00062 void SetUrl (const string sUrl ); 00063 void SetDescription (const string sDescription ); 00064 void SetMd4 (const string sMd4 ); 00065 00066 const string *GetData (void) const; 00067 //******************* 00068 // All Get Functions. 00069 //******************* 00070 const string GetDate (void) const; // return const string("yyyy-mm-dd") 00071 const string GetVersion (void) const; 00072 const string GetLanguage (void) const; 00073 const string GetCompany (void) const; 00074 const string GetUrl (void) const; 00075 const string GetDescription (void) const; 00076 const string GetMd4 (void) const; 00077 00078 protected: 00079 00080 private: 00081 string m_pSoftwareData[NUM_OF_SOFTWARE_DATA]; 00082 00083 void SetDay (const string sDay); 00084 void SetMonth (const string sMonth); 00085 void SetYear (const string sYear); 00086 00087 const string GetDay (void) const; 00088 const string GetMonth (void) const; 00089 const string GetYear (void) const; 00090 00091 }; 00092 00093 #endif // _cSoftware_h