00001 //Filename : OFPHOTO.h 00002 //Description : FacultyPhotoRes Class Declaration 00003 00004 #ifndef __OFPHOTO_H 00005 #define __OFPHOTO_H 00006 00007 #ifndef __ORESDB_H 00008 #include <ORESDB.H> 00009 #endif 00010 00011 //------ define constant --------// 00012 00013 enum { 00014 FACULTY_PHOTO_WIDTH = 60, 00015 FACULTY_PHOTO_HEIGHT = 60 00016 }; 00017 00018 //------- Define FacultyPhotoRec --------// 00019 00022 struct FacultyPhotoRec { 00023 enum { NATIONALITY_LEN=10 }; 00024 00025 char sex; 00026 char nationality[NATIONALITY_LEN]; 00027 00028 char file_name[8]; 00029 char bitmap_ptr[4]; 00030 }; 00031 00032 //------ Define struct FacultyPhotoInfo --------// 00033 00036 struct FacultyPhoto { 00037 char gender_ethnic_group; 00038 char* bitmap_ptr; 00039 }; 00040 00041 //------- Define class FacultyPhotoRes ---------// 00042 00044 class FacultyPhotoRes { 00045 public: 00046 bool init_flag; 00047 00048 short photo_count; 00049 FacultyPhoto* info_array; 00050 00051 ResourceDb res_photo; 00052 00053 public: 00054 FacultyPhotoRes(); 00055 ~FacultyPhotoRes(); 00056 00057 void init(); 00058 void deinit(); 00059 00060 void pick_photo(); 00061 00062 FacultyPhoto* operator[](int photoId); 00063 00064 private: 00065 void load_info(); 00066 }; 00067 00068 extern FacultyPhotoRes faculty_photo_res; 00069 00070 //-----------------------------------------------// 00071 #endif