|
WXP C++ Library Version 6.74.9
|
This class reads in raw METAR data. More...
#include "../include/MetarFile.h"
Public Member Functions | |
| MetarFile () | |
| MetarFile (Filename &filename) | |
| ~MetarFile () | |
| int | open (Filename &filename) |
| int | init () |
| bool | isOpen () |
| int | rewind () |
| int | close () |
| int | checkType (char *filename) |
| int | getLine (String &str) |
| char * | getHeader () |
Static Public Attributes | |
| static const int | UNK = 0 |
| static const int | METAR = 1 |
| static const int | SPECI = 2 |
This class reads in raw METAR data.
| MetarFile::MetarFile | ( | ) |
Constructor. Initializes data
| MetarFile::MetarFile | ( | Filename & | filename | ) |
| MetarFile::~MetarFile | ( | ) |
Destructor.
References WXP::File::close().
| int MetarFile::checkType | ( | char * | line | ) |
Checks the type of data to determine whether a METAR report or not
| line | String to check |
References WXP::StrLib::equal(), METAR, and SPECI.
Referenced by getLine().
| int MetarFile::close | ( | ) |
| char * MetarFile::getHeader | ( | ) |
Gets the latest WMO header from the file
| int MetarFile::getLine | ( | String & | string | ) |
Gets the next line with METAR data in it from the file.
Skips non-METAR data
| string | String class to put data |
References checkType(), WXP::StrLib::copy(), WXP::StrLib::equal(), WXP::File::getLine(), WXP::StrLib::trimWS(), and UNK.
| bool MetarFile::isOpen | ( | ) |
Is file open
| int MetarFile::open | ( | Filename & | filename | ) |
Opens a file for parsing
| filename | Filename to open |
References close(), WXP::Filename::getName(), WXP::File::isOpen(), and WXP::File::open().
Referenced by MetarFile().
| int MetarFile::rewind | ( | ) |
Rewinds the file
References WXP::File::rewind().
|
static |
Hourly METAR data
Referenced by checkType().
|
static |
intermediate METAR specials
Referenced by checkType().
|
static |
Unkown data
Referenced by getLine().