00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OPENMS_DATASTRUCTURES_DATETIME_H
00028 #define OPENMS_DATASTRUCTURES_DATETIME_H
00029
00030 #include <OpenMS/DATASTRUCTURES/Date.h>
00031 #include <OpenMS/CONCEPT/Types.h>
00032 #include <OpenMS/CONCEPT/Exception.h>
00033
00034 namespace OpenMS
00035 {
00044 class DateTime
00045 : public QDateTime
00046 {
00047 public:
00048
00054 DateTime();
00056 DateTime(const DateTime& date);
00058 DateTime(const QDateTime& date);
00059
00061 DateTime& operator= (const DateTime& source);
00062
00068 void setDate(const String& date) throw (Exception::ParseError);
00069
00075 void setTime(const String& date) throw (Exception::ParseError);
00076
00082 void setDate(UInt month, UInt day, UInt year) throw (Exception::ParseError);
00083
00089 void setTime(UInt hour, UInt minute, UInt second) throw (Exception::ParseError);
00090
00096 void set(UInt month, UInt day, UInt year, UInt hour, UInt minute, UInt second) throw (Exception::ParseError);
00097
00103 void get(UInt& month, UInt& day, UInt& year, UInt& hour, UInt& minute, UInt& second) const;
00104
00110 void getDate(UInt& month, UInt& day, UInt& year) const;
00111
00117 void getDate(String& date) const;
00118
00124 void getTime(UInt& hour, UInt& minute, UInt& second) const;
00125
00131 void getTime(String& time) const;
00132
00134 void now();
00135
00137 void clear();
00138
00144 void get(String& date) const;
00145
00151 void set(const String& date) throw (Exception::ParseError);
00152
00153 protected:
00154 };
00155
00156 }
00157
00158 #endif // OPENMS_DATASTRUCTURES_DATETIME_H