blob: f1fabe83db012a27ab42ca02f915963817301578 (
plain)
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
|
//
//
// C++ Interface: $MODULE$
//
// Description:
//
//
// Author: ian reinhart geiser <[email protected]>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef STATIONDATABASE_H
#define STATIONDATABASE_H
#include <tqmap.h>
#include <tqstring.h>
#include <klocale.h>
#include <kstandarddirs.h>
/**
This is the main database for mapping METAR codes to Station information.
@author ian reinhart geiser
*/
class StationInfo;
class StationDatabase
{
public:
StationDatabase(const TQString path = locate("data", "kweatherservice/stations.dat"));
~StationDatabase();
TQString stationNameFromID(const TQString& id);
TQString stationLongitudeFromID( const TQString &stationID);
TQString stationLatitudeFromID(const TQString &stationID);
TQString stationCountryFromID( const TQString &stationID);
TQString stationIDfromName( const TQString &name );
private:
TQMap<TQString, StationInfo> theDB;
bool loadStation( const TQString & stationID );
const TQString mPath;
};
#endif
|