00001 /* 00002 * $Id: Time.h 562 2007-12-02 08:04:16Z mindstorm2600 $ 00003 * 00004 * X-VR2 00005 * 00006 * Copyright (C) Juan V. Guerrero 2007 00007 * 00008 * Juan V. Guerrero <mindstorm2600@users.sourceforge.net> 00009 * 00010 * This program is free software, distributed under the terms of 00011 * the GNU General Public License Version 2. See the LICENSE file 00012 * at the top of the source tree. 00013 */ 00014 #ifndef __XVR2_TIME_H__ 00015 #define __XVR2_TIME_H__ 00016 #include<xvr2/Date.h> 00017 #include<xvr2/CoreExceptions.h> 00018 00019 namespace xvr2{ 00020 00024 class Time:public Date{ 00025 protected: 00026 virtual void encode(); 00027 public: 00029 Time(); 00032 Time(UInt32 tstamp); 00035 Time(int hour, int min, int sec); 00039 Time(const char *time_text); 00043 Time(const String &time_text); 00044 Time(const Time *t); 00045 Time(const Time &t); 00046 virtual ~Time(); 00047 Time &operator=(const Time &t); 00049 virtual int Hour(); 00051 virtual int Minute(); 00053 virtual int Second(); 00055 //const String &toString() const; 00058 const UInt32 timestamp(); 00059 }; 00060 00061 } 00062 00063 #endif