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
33 #include <simgear/timing/geocoord.h>
36 * SGTimeZone is derived from geocoord, and stores the timezone centerpoint,
37 * as well as the countrycode and the timezone descriptor. The latter is
38 * used in order to get the local time.
42 class SGTimeZone : public SGGeoCoord
47 std::string countryCode;
48 std::string descriptor;
53 * Default constructor.
55 SGTimeZone() : SGGeoCoord()
62 * Build a timezone object with a specifed latitude, longitude, country
63 * code, and descriptor
66 * @param cc country code
67 * @param desc descriptor
69 SGTimeZone(float la, float lo, char* cc, char* desc);
72 * Build a timezone object from a textline in zone.tab
73 * @param infoString the textline from zone.tab
75 SGTimeZone(const char *infoString);
78 * The copy constructor
79 * @param other the source object
81 SGTimeZone(const SGTimeZone &other);
86 virtual ~SGTimeZone() { };
89 * Return the descriptor string
90 * @return descriptor string (char array)
92 virtual const char * getDescription() { return descriptor.c_str(); };
96 * SGTimeZoneContainer is derived from SGGeoCoordContainer, and has some
97 * added functionality.
100 class SGTimeZoneContainer : public SGGeoCoordContainer
103 SGTimeZoneContainer(const char *filename);
104 virtual ~SGTimeZoneContainer();
109 #endif // _TIMEZONE_H_