Earth Observation Mission CFI Software Lib Software User Manual |
00001 //-------------------------------------------------------------------- 00002 // CVS Info: $Id: EETime.h,v 1.4 2009/04/13 13:30:08 expcfi Exp $ 00003 //-------------------------------------------------------------------- 00004 00005 #ifndef _EECFI_TIME_H 00006 #define _EECFI_TIME_H 00007 00008 00009 //--INCLUDE----------------------------------------------------------- 00010 #include "LibData.h" 00011 #include "CfiClass.h" 00012 #include "TimeCorrelation.h" 00013 00014 //--NAMESPACES-------------------------------------------------------- 00015 using namespace std; 00016 00017 namespace EECFI 00018 { 00019 00023 class Time: public CfiClass 00024 { 00025 // Friend classes 00026 friend class StateVector; 00027 friend class StarData; 00028 00029 public: 00030 00031 double time; 00032 long ref; 00033 long format; 00034 00036 Time(double value = 0, 00037 long reference = XLCFI_TIME_TAI, 00038 long timeFormat = XLCFI_PROC); 00039 00041 Time(TimeCorrelation timeCorr, 00042 double value = 0, 00043 long reference = XLCFI_TIME_TAI, 00044 long timeFormat = XLCFI_PROC); 00045 00047 ~Time() {}; 00048 00050 void setAscii(string asciiTime, 00051 long reference = XLCFI_TIME_TAI, 00052 long timeFormat = XLCFI_ASCII_STD) throw (CfiError); 00053 00056 void setTransport(long transportTime[4], 00057 long reference = XLCFI_TIME_TAI, 00058 long timeFormat = XLCFI_TRANS_STD) throw (CfiError); 00059 00061 void setProcessing(double procTime, 00062 long reference = XLCFI_TIME_TAI, 00063 long timeFormat = XLCFI_PROC); 00064 00066 void getAscii(string &asciiTime, 00067 long reference = XLCFI_TIME_TAI, 00068 long timeFormat = XLCFI_ASCII_STD) throw (CfiError); 00069 00072 void getTransport(long transportTime[4], 00073 long reference = XLCFI_TIME_TAI, 00074 long timeFormat = XLCFI_TRANS_STD) throw (CfiError); 00075 00077 Time getProcessing(long reference = XLCFI_TIME_TAI, 00078 long timeFormat = XLCFI_PROC) throw (CfiError); 00079 00081 void change(long reference, 00082 long timeFormat = XLCFI_PROC) throw (CfiError); 00083 00085 void now(); 00086 00088 void setBOM(); 00090 void setEOM(); 00091 00092 // Date arithmetic operators. 00094 Time operator+(const double d) const; 00096 Time operator-(const double d) const; 00098 double operator-(const Time &t) const throw (CfiError); 00099 00100 // Time comparisons. 00102 bool operator>( const Time &t) const throw (CfiError); 00104 bool operator<( const Time &t) const throw (CfiError); 00106 bool operator>=(const Time &t) const throw (CfiError); 00108 bool operator<=(const Time &t) const throw (CfiError); 00110 bool operator==(const Time &t) const throw (CfiError); 00112 bool operator!=(const Time &t) const throw (CfiError); 00113 00114 00115 protected: 00116 00118 GenericId* getTimeId(); 00119 00120 private: 00121 00122 TimeCorrelation timeId; 00123 int isBOM_EOM; 00124 00125 }; 00126 00127 } // closing namespace 00128 00129 #endif