OpenMW
|
00001 #ifndef GAME_MWWORLD_TIMESTAMP_H 00002 #define GAME_MWWORLD_TIMESTAMP_H 00003 00004 namespace MWWorld 00005 { 00009 class TimeStamp 00010 { 00011 float mHour; 00012 int mDay; 00013 00014 public: 00015 00016 explicit TimeStamp (float hour = 0, int day = 0); 00019 00020 float getHour() const; 00021 00022 int getDay() const; 00023 00024 TimeStamp& operator+= (double hours); 00026 }; 00027 00028 bool operator== (const TimeStamp& left, const TimeStamp& right); 00029 bool operator!= (const TimeStamp& left, const TimeStamp& right); 00030 00031 bool operator< (const TimeStamp& left, const TimeStamp& right); 00032 bool operator<= (const TimeStamp& left, const TimeStamp& right); 00033 00034 bool operator> (const TimeStamp& left, const TimeStamp& right); 00035 bool operator>= (const TimeStamp& left, const TimeStamp& right); 00036 00037 TimeStamp operator+ (const TimeStamp& stamp, double hours); 00038 TimeStamp operator+ (double hours, const TimeStamp& stamp); 00039 00040 double operator- (const TimeStamp& left, const TimeStamp& right); 00042 } 00043 00044 #endif