Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

d_Time.h

Go to the documentation of this file.
00001 
00002 #ifndef d_Time_h
00003 #define d_Time_h 1
00004 
00005 #include <ostream>
00006 
00007 #include "cODMGLiteral.h"
00008 #include "oTime.h"
00009 
00010 class _ODLL d_Timestamp;
00011 class _ODLL d_Interval;
00012 
00013 /**
00014  * SEE ALSO: d_Date, d_Timestamp
00015  */
00016 
00017 class _ODLL d_Time : public oTime
00018 {
00019   public:
00020     enum Time_Zone { GMT = 0, GMT12 = 12, GMT_12 = -12, GMT1 = 1, GMT_1 = -1, GMT2 = 2, GMT_2 = -2,
00021                      GMT3 = 3, GMT_3 = -3, GMT4 = 4, GMT_4 = -4,
00022                      GMT5 = 5, GMT_5 = -5, GMT6 = 6, GMT_6 = -6,
00023                      GMT7 = 7, GMT_7 = -7, GMT8 = 8, GMT_8 = -8,
00024                      GMT9 = 9, GMT_9 = -9, GMT10 = 10, GMT_10= -10,
00025                      GMT11 = 11, GMT_11= -11, USeastern = -5, UScentral = -6,
00026                      USmountain = -7, USpacific = -8 };
00027 
00028     d_Time();
00029     d_Time(unsigned short hour, unsigned short minute, float sec);
00030     d_Time(unsigned short hour, unsigned short minute, float sec, short tzhour, short tzminute);
00031     d_Time(const d_Time&);
00032     d_Time(const d_Timestamp&);
00033 
00034 
00035     ~d_Time();
00036 
00037         d_Time& operator=(const d_Time&);
00038     d_Time& operator=(const d_Timestamp&);
00039 
00040     unsigned short hour() const;
00041     unsigned short minute() const;
00042     float second() const;
00043     short tz_hour() const;
00044     short tz_minute() const;
00045 
00046     static void set_default_Time_Zone( Time_Zone );
00047     static void set_default_Time_Zone_to_local();
00048     static d_Time current();
00049 
00050     d_Time& operator+=(const d_Interval&);
00051     d_Time& operator-=(const d_Interval&);
00052 
00053 /*
00054     friend d_Time operator+(const d_Time&, const d_Interval&);
00055     friend d_Time operator+(const d_Interval&, const d_Time&);
00056     friend d_Interval operator-(const d_Time&, const d_Time&);
00057     friend d_Time operator-(const d_Time&, const d_Interval&);
00058     friend int operator==(const d_Time&, const d_Time&);
00059     friend int operator!=(const d_Time&, const d_Time&);
00060     friend int operator<(const d_Time&, const d_Time&);
00061     friend int operator<=(const d_Time&, const d_Time&);
00062     friend int operator>(const d_Time&, const d_Time&);
00063     friend int operator>=(const d_Time&, const d_Time&);
00064     friend int overlaps(const d_Time&, const d_Time&, const d_Time&, const d_Time&);
00065     friend int overlaps(const d_Timestamp&, const d_Timestamp&,
00066     const d_Time&, const d_Time&);
00067     friend int overlaps(const d_Time&, const d_Time&, const d_Timestamp&, const d_Timestamp&);
00068 */
00069     static int is_valid_Time(unsigned short hour, unsigned short minute, float sec);
00070 
00071     friend std::ostream& operator<<(std::ostream& , const d_Time&);
00072 };
00073 //------------------------------------------------------------------------------
00074 //------------------------------------------------------------------------------
00075 
00076 #endif

Generated on Fri Nov 29 17:12:13 2002 for Orient ODBMS Just Edition v. 2.0e by doxygen1.3-rc1