00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _AFLIBDATETIME_H_
00023 #define _AFLIBDATETIME_H_
00024
00025
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029
00030 #include <iostream>
00031
00032 #include <string>
00033 using std::string;
00034 using std::ostream;
00035
00036
00045 class aflibDateTime {
00046
00047 public:
00048
00049 aflibDateTime ();
00050
00051 aflibDateTime (
00052 int year,
00053 int month,
00054 int day,
00055 int hour,
00056 int minute,
00057 int second);
00058
00059 aflibDateTime (
00060 string date,
00061 string time);
00062
00063 ~aflibDateTime();
00064
00065 bool
00066 operator < (const aflibDateTime& date) const;
00067
00068 bool
00069 operator <= (const aflibDateTime& date) const;
00070
00071 bool
00072 operator == (const aflibDateTime& date) const;
00073
00074 friend ostream&
00075 operator << (
00076 ostream& o,
00077 const aflibDateTime& date);
00078
00079 void
00080 setYear(int year);
00081
00082 int
00083 getYear() const;
00084
00085 void
00086 setMonth(int month);
00087
00088 int
00089 getMonth() const;
00090
00091 void
00092 setDay(int day);
00093
00094 int
00095 getDay() const;
00096
00097 void
00098 setHour(int hour);
00099
00100 int
00101 getHour() const;
00102
00103 void
00104 setMinute(int minute);
00105
00106 int
00107 getMinute() const;
00108
00109 void
00110 setSecond(int second);
00111
00112 int
00113 getSecond() const;
00114
00115 void
00116 setCurrentTime();
00117
00118
00119 private:
00120
00121 int _year;
00122 int _month;
00123 int _day;
00124 int _hour;
00125 int _minute;
00126 int _second;
00127
00128 };
00129
00130
00131 #endif