/* * 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_TSTYP_H_ #define PG_TSTYP_H_ #include #pragma interface #include #include #include class TStyp : public Timebase { public: enum precision { pyear = 'Y', pmonth = 'M', pday = 'D', phour = 'H', pminute = 'M', psecond = 'S', pmax = '\0', }; private: TMtyp _time; DTtyp _date; precision _prec; public: TStyp(); TStyp(int year, int month, int day, int hour, int minute, int second, int tzHours = TMtyp::TimeZoneUndef, int tzMinutes = 0, int frac = TMtyp::FracUndef, precision prec=pmax); TStyp(const DTtyp&, const TMtyp&); TStyp(const DTtyp&); operator DTtyp& (); operator TMtyp& (); int getHour() const; int getMin() const; int getSec() const; int getFrac() const; int getTimeZoneHours() const; int getTimeZoneMin() const; int getYear() const; int getMonth() const; int getDay() const; precision getPrec() const; void set(); /* sets the time stamp to the current system time */ void setYear(int); void setMonth(int); void setDay(int); void setHour(int); void setMin(int); void setSec(int); void setFrac(int); void setTimeZoneHours(int); void setTimeZoneMin(int); void setPrec(precision); void unset(); void nullify(); result input(istream&); void output(ostream&) const; friend void stamp(TStyp&); }; #ifndef OUTLINE # include "TStyp.icc" #endif #endif /* !PG_TSTYP_H_ */