00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00024 #ifndef __AXISTIME_H_OF_AXIS_INCLUDED_
00025 #define __AXISTIME_H_OF_AXIS_INCLUDED_
00026
00027 #include "TypeMapping.h"
00028 #include "IParam.h"
00029
00030 using namespace std;
00031
00032 typedef struct
00033 {
00034 time_t years;
00035 time_t months;
00036 time_t days;
00037 time_t hours;
00038 time_t mins;
00039 double secs;
00040 } uDuration;
00041
00042
00050 class AxisTime
00051 {
00052 public:
00053 AxisTime();
00054 AxisTime(time_t ptrTime_t);
00055 AxisTime(struct tm ntime);
00056 virtual ~AxisTime();
00057 void setValue(const AxisChar* strValue);
00058 void setValue(XSDTYPE type, uParamValue Value);
00059 void setType(XSDTYPE m_Type);
00060 AxisString getValue();
00061 AxisString& serialize(const AxisChar* sName, struct tm tValue,
00062 XSDTYPE nType);
00063 AxisString& serialize(const AxisChar* sName, long lDuration,
00064 XSDTYPE nType);
00065 double getDuration();
00066 struct tm getDateTime();
00067 struct tm getDate();
00068 struct tm getTime();
00069 int mkCTime();
00070 static struct tm deserialize(const AxisChar* strValue, XSDTYPE type);
00071 static long deserializeDuration(const AxisChar* strValue,
00072 XSDTYPE type);
00073
00074 private:
00075 void processValue();
00076 AxisString m_sValue;
00077 XSDTYPE m_Type;
00078 struct tm m_TM, m_TMUTC, m_TMDuration;
00079 time_t m_Time;
00080 char buf1[80];
00081 AxisString strYears;
00082 AxisString strMonths;
00083 AxisString strDays;
00084 AxisString strHours;
00085 AxisString strMins;
00086 AxisString strSecs;
00087 time_t m_intYears;
00088 time_t m_intMonths;
00089 time_t m_intDays;
00090 time_t m_intHours;
00091 time_t m_intMins;
00092 time_t m_intSecs;
00093 AxisString strZone;
00094 uDuration duration;
00095 time_t m_longYears;
00096 double m_Duration;
00097
00098 AxisString strXSDDuration;
00099 AxisString strXSDDate;
00100 };
00101
00102 #endif
00103