/usr/include/simgear/timing/timezone.h is in libsimgear-dev 3.4.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | /* -*- Mode: C++ -*- *****************************************************
* timezone.h
* Written by Durk Talsma. Started July 1999.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
**************************************************************************/
/** \file timezone.h
*
* Provides SGTimeZone and SGTimeZoneContainer
*
*/
#ifndef _TIMEZONE_H_
#define _TIMEZONE_H_
#include <string>
#include <vector>
#include <simgear/math/SGMath.hxx>
#include <simgear/math/SGGeod.hxx>
/**
* SGTimeZone stores the timezone centerpoint,
* as well as the countrycode and the timezone descriptor. The latter is
* used in order to get the local time.
*
*/
class SGTimeZone
{
private:
SGVec3d centerpoint; // centre of timezone, in cartesian coordinates
std::string countryCode;
std::string descriptor;
public:
/**
* Build a timezone object with a specifed latitude, longitude, country
* code, and descriptor
* @param pt centerpoint
* @param cc country code
* @param desc descriptor
*/
SGTimeZone(const SGGeod& pt, char* cc, char* desc);
/**
* Build a timezone object from a textline in zone.tab
* @param infoString the textline from zone.tab
*/
SGTimeZone(const char *infoString);
/**
* The copy constructor
* @param other the source object
*/
SGTimeZone(const SGTimeZone &other);
/**
* Return the descriptor string
* @return descriptor string (char array)
*/
const char * getDescription() { return descriptor.c_str(); };
const SGVec3d& cartCenterpoint() const
{
return centerpoint;
}
};
/**
* SGTimeZoneContainer
*/
class SGTimeZoneContainer
{
public:
SGTimeZoneContainer(const char *filename);
~SGTimeZoneContainer();
SGTimeZone* getNearest(const SGGeod& ref) const;
private:
typedef std::vector<SGTimeZone*> TZVec;
TZVec zones;
};
#endif // _TIMEZONE_H_
|