00001
00002 #pragma warning(disable:4786)
00003
00004 #include <functional>
00005 #include <qdatetime.h>
00006 #include <map>
00007 #include <iostream>
00008
00009 using std::binary_function;
00010 using std::less;
00011 using std::map;
00012 using std::ostream;
00013
00014 enum EinschaetzungsSkala {null, TL, TNL, TU, KL, KNL, KU};
00015
00016 struct lessQTime : public binary_function<QTime, QTime, bool> {
00017 bool operator()(const QTime& x, const QTime& y) const{
00018 return x<y; }
00019 };
00020
00021 typedef map<QTime, EinschaetzungsSkala, lessQTime > QTime2Einschaetzung;
00022
00023 struct structGesamteEinschaetzung {
00024 EinschaetzungsSkala Einschaetzung;
00025 EinschaetzungsSkala EinschaetzungDavor;
00026 int Dauer;
00027
00028 structGesamteEinschaetzung
00029 (EinschaetzungsSkala a=null,EinschaetzungsSkala b=null, int c=0)
00030 : Einschaetzung (a), EinschaetzungDavor (b), Dauer(c) {};
00031 friend ostream& operator<< (ostream& os, const structGesamteEinschaetzung& rhs);
00032 };
00033
00034 class ZeitVerlauf {
00035 public:
00036 ZeitVerlauf();
00037 QTime2Einschaetzung Sinneinheiten;
00038 void testZeitverlauf();
00039
00040 public:
00041
00042 void anhaengen(const QTime &Endmoment, const EinschaetzungsSkala Einschaetzung);
00043
00044
00045 QTime ZeitVerlauf::LetzterMoment();
00046 EinschaetzungsSkala Einschaetzung (const QTime &Endmoment);
00047 EinschaetzungsSkala EinschaetzungDavor (const QTime &Endmoment);
00048 int Dauer (const QTime &Endmoment);
00049
00050
00051 structGesamteEinschaetzung GesamteEinschaetzung (const QTime &Endmoment);
00052
00053
00054
00055 bool printGesamteEinschaetzung (const QTime &Endmoment, QString &ergebnis);
00056 bool printGesamtenZeitVerlauf (QString &ergebnis);
00057
00058
00059
00060
00061 };