1 /* -*- Mode: C++ -*- *****************************************************
3 * Written by Durk Talsma. Started July 1999.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 **************************************************************************/
23 * Provides SGTimeZone and SGTimeZoneContainer
32 #include <simgear/timing/geocoord.h>
35 * SGTimeZone is derived from geocoord, and stores the timezone centerpoint,
36 * as well as the countrycode and the timezone descriptor. The latter is
37 * used in order to get the local time.
41 class SGTimeZone : public SGGeoCoord
52 * Default constructor.
54 SGTimeZone() : SGGeoCoord()
61 * Build a timezone object with a specifed latitude, longitude, country
62 * code, and descriptor
65 * @param cc country code
66 * @param desc descriptor
68 SGTimeZone(float la, float lo, char* cc, char* desc);
71 * Build a timezone object from a textline in zone.tab
72 * @param infoString the textline from zone.tab
74 SGTimeZone(const char *infoString);
77 * The copy constructor
78 * @param other the source object
80 SGTimeZone(const SGTimeZone &other);
85 virtual ~SGTimeZone() { };
88 * Print the descriptor string
90 virtual void print() { printf("%s", descriptor.c_str()); }
93 * Return the descriptor string
94 * @return descriptor string (char array)
96 virtual const char * getDescription() { return descriptor.c_str(); };
100 * SGTimeZoneContainer is derived from SGGeoCoordContainer, and has some
101 * added functionality.
104 class SGTimeZoneContainer : public SGGeoCoordContainer
107 SGTimeZoneContainer(const char *filename);
108 virtual ~SGTimeZoneContainer();
113 #endif // _TIMEZONE_H_