00001
00002
00003
00004
00005
00006
00007 #if !defined(course_h)
00008
00009 #define course_h
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "field.h"
00022 #include <vector>
00023 #include "student.h"
00024
00025
00026 typedef person* entityptr;
00027
00028 typedef vector<entityptr> vectorentity;
00029
00031 class course : public field
00032 {
00033 public:
00034 course();
00035 virtual ~course();
00036 course(const course& c);
00037 const course& operator=(const course& rhs);
00038 bool operator<(const course& c);
00039 bool operator==(const course& c);
00040 vectorentity & getStuds();
00041 void clear();
00042 void setHours(int h);
00043 void setDept(string d);
00044 void setNum(string n);
00045 void setSem(string s);
00046 void setYear(int y);
00047 void setPers(vectorentity p);
00048
00049 public:
00050 virtual string ToParse(int fld);
00051 virtual string ToString();
00052 virtual string ToFileFmt();
00053
00054 protected:
00055
00056 void copy(const course& c);
00057
00058
00059
00061 int m_cHours;
00063 vectorentity m_pers;
00064
00065
00066
00067 string m_dept;
00068
00069
00070
00071 string m_sem;
00072
00073
00074
00075 int m_year;
00076
00077
00078
00079 string m_num;
00080
00081
00082 private:
00083
00084
00085 };
00086
00087
00088
00089 #endif
00090