00001
00002
00003
00004 #if !defined(dob_h)
00005 #define dob_h
00006 #include <string>
00007
00008 using namespace std;
00009
00010
00011
00012
00013
00014
00015 #include "field.h"
00016
00017
00018 class dob : public field
00019 {
00020 public:
00021 dob();
00022 virtual ~dob();
00023 dob(const dob& d);
00024 const dob& operator=(const dob& rhs);
00025 bool operator<(const dob& d);
00026
00027 public:
00028
00029 inline int getYear() const
00030 {
00031 return m_year;
00032 }
00033
00034 inline short int getMonth() const
00035 {
00036 return m_month;
00037 }
00038
00039 inline short int getDay() const
00040 {
00041 return m_day;
00042 }
00043
00044
00045
00046 inline void setYear(const int& year)
00047 {
00048 m_year = year;
00049 }
00050
00051 inline void setMonth(const int& month)
00052 {
00053 m_month = month;
00054 }
00055
00056 inline void setDay(const int& day)
00057 {
00058 m_day = day;
00059 }
00060
00061 virtual string ToParse(int fld);
00062 virtual string ToString();
00063 virtual string ToFileFmt();
00064
00065
00066 protected:
00067 void copy(const dob& dob);
00068
00069
00070
00071
00072 int m_year;
00073
00074
00075
00076 short int m_month;
00077
00078
00079
00080 short int m_day;
00081
00082 private:
00083
00084
00085 };
00086
00087 #endif