/* * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PG_TMTYP_H_ #define PG_TMTYP_H_ #include #pragma interface #include #include class TMtyp : public Timebase { public: enum { HourMin = 0, HourMax = 23, MinMin = 0, MinMax = 59, SecMin = 0, SecMax = 59, FracMin = 0, FracMax =9999, FracUndef = -1, TimeZoneHoursMin = -23, TimeZoneHoursMax = 23, TimeZoneMinMin = -59, TimeZoneMinMax = 59, TimeZoneUndef = 127, }; private: int _hour; // 0..23 int _minute; // 0..59 int _second; // 0..59 int _sec10000; // 0000 .. 9999 int _tzHours; // offset hours east of Greenwich -23..0..+23 int _tzMinutes; // offset minutes east of Greenwich -59..0..+59 public: TMtyp(); TMtyp(int hour, int minute, int second, int tzHours = TimeZoneUndef, int tzMinutes = 0, int frac = FracUndef); int getHour() const; int getMin() const; int getSec() const; int getFrac() const; int getTimeZoneHours() const; int getTimeZoneMin() const; void setHour(int); void setMin(int); void setSec(int); void setDay(int); void setFrac(int); void setTimeZoneHours(int); void setTimeZoneMin(int); void unset(); void nullify(); result input(istream&); void output(ostream&) const; }; #ifndef OUTLINE # include "TMtyp.icc" #endif #endif /* !PG_TMTYP_H_ */