00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef _RTXCPPDATETIME_H_
00029 #define _RTXCPPDATETIME_H_
00030
00031 #include "rtxsrc/rtxCommon.h"
00032 #include "rtxsrc/OSRTBaseType.h"
00033
00034 class EXTRTCLASS OSXSDDateTimeClass
00035 : public OSXSDDateTime, public OSRTBaseType {
00036 public:
00041 OSXSDDateTimeClass ();
00042
00048 OSXSDDateTimeClass (const OSUTF8CHAR* dtString);
00049
00063 OSXSDDateTimeClass (OSINT32 year_, OSUINT8 mon_,
00064 OSUINT8 day_, OSUINT8 hour_, OSUINT8 min_,
00065 OSREAL sec_, OSBOOL tz_flag_, OSINT32 tzo_);
00072 OSXSDDateTimeClass (const OSXSDDateTimeClass& dt);
00073
00080 OSXSDDateTimeClass (const OSXSDDateTime& dt);
00081
00086 OSRTBaseType* clone () const { return new OSXSDDateTimeClass (*this); }
00087
00097 int getTime (time_t& timeMs);
00098
00108 virtual int parseString (const OSUTF8CHAR* dtString);
00109
00115 void print (const char* name);
00116
00125 int setCurrent ();
00126
00135 int setCurrentTz ();
00136
00145 int setDateTime (struct tm* time);
00146
00155 int setLocalTime (time_t timeMs);
00156
00168 int setUtcTime (time_t timeMs);
00169
00175 void setValue (const OSUTF8CHAR* utf8str);
00176
00182 void setValue (const OSXSDDateTime& dt);
00183
00191 const OSUTF8CHAR* toString ();
00192
00201 virtual const OSUTF8CHAR* toString (OSUTF8CHAR* buffer, size_t bufsize);
00202
00206 inline OSXSDDateTimeClass& operator= (const OSXSDDateTimeClass& orig) {
00207 setValue (orig);
00208 return *this;
00209 }
00210 } ;
00211
00212 class EXTRTCLASS OSXSDDateClass : public OSXSDDateTimeClass {
00213 public:
00218 OSXSDDateClass () {}
00219
00225 OSXSDDateClass (const OSUTF8CHAR* dtString);
00226
00240 OSXSDDateClass (OSINT32 year, OSUINT8 mon,
00241 OSUINT8 day, OSUINT8 hour, OSUINT8 min,
00242 OSREAL sec, OSBOOL tz_flag,OSINT32 tzo):
00243 OSXSDDateTimeClass (year, mon, day, hour, min, sec, tz_flag, tzo) {}
00244
00251 OSXSDDateClass (const OSXSDDateTimeClass& dt) :
00252 OSXSDDateTimeClass (dt) {}
00253
00260 OSXSDDateClass (const OSXSDDateTime& dt) :
00261 OSXSDDateTimeClass (dt) {}
00262
00267 OSRTBaseType* clone () const { return new OSXSDDateClass (*this); }
00268
00278 virtual int parseString (const OSUTF8CHAR* dtString);
00279
00285 void print (const char* name);
00286
00295 virtual const OSUTF8CHAR* toString (OSUTF8CHAR* buffer, size_t bufsize);
00296 } ;
00297
00298 class EXTRTCLASS OSXSDTimeClass : public OSXSDDateTimeClass {
00299 public:
00304 OSXSDTimeClass () {}
00305
00311 OSXSDTimeClass (const OSUTF8CHAR* dtString);
00312
00326 OSXSDTimeClass (OSINT32 year, OSUINT8 mon,
00327 OSUINT8 day, OSUINT8 hour, OSUINT8 min,
00328 OSREAL sec, OSBOOL tz_flag,OSINT32 tzo):
00329 OSXSDDateTimeClass (year, mon, day, hour, min, sec, tz_flag, tzo) {}
00330
00337 OSXSDTimeClass (const OSXSDDateTimeClass& dt) :
00338 OSXSDDateTimeClass (dt) {}
00339
00346 OSXSDTimeClass (const OSXSDDateTime& dt) :
00347 OSXSDDateTimeClass (dt) {}
00348
00353 OSRTBaseType* clone () const { return new OSXSDTimeClass (*this); }
00354
00364 virtual int parseString (const OSUTF8CHAR* dtString);
00365
00371 void print (const char* name);
00372
00381 virtual const OSUTF8CHAR* toString (OSUTF8CHAR* buffer, size_t bufsize);
00382 } ;
00383
00384 #endif