|
WXP C++ Library Version 6.74.9
|
This class reads in surface data from a WXP formatted file from file. More...
#include "../include/SfcWxpFile.h"
Public Member Functions | |
| SfcWxpFile () | |
| SfcWxpFile (const char *filename) | |
| SfcWxpFile (const char *filename, int access) | |
| ~SfcWxpFile () | |
| bool | isOpen () |
| int | open (const char *filename, int access) |
| int | rewind () |
| int | close () |
| int | setDate (Date &rdate) |
| int | getDate (Date &rdate) |
| const char * | getDatim () |
| int | read (SfcData &data) |
| int | write (SfcData &data) |
Static Public Member Functions | |
| static int | checkType (const char *filename) |
This class reads in surface data from a WXP formatted file from file.
| SfcWxpFile::SfcWxpFile | ( | ) |
Constructor
| SfcWxpFile::SfcWxpFile | ( | const char * | filename | ) |
Constructor. Opens the surface data file (access=READ, type=UNK)
| filename | File to open |
References open(), and WXP::FileAttr::READ.
| SfcWxpFile::SfcWxpFile | ( | const char * | filename, |
| int | raccess | ||
| ) |
Constructor. Opens the surface data file
| filename | File to open |
| raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
References open().
| SfcWxpFile::~SfcWxpFile | ( | ) |
Destructor
References WXP::File::close().
|
static |
Checks the type of data in the file
| filename | File to check |
References WXP::FileTool::getSize(), WXP::File::isOpen(), and WXP::File::read().
Referenced by open().
| int SfcWxpFile::close | ( | ) |
Closes the surface data file
References WXP::File::close().
Referenced by WXP::SfcFile::close(), and open().
| int SfcWxpFile::getDate | ( | Date & | rdate | ) |
Gets the date of the file
| rdate | Date class to put date information |
Referenced by WXP::SfcFile::getDate().
| int SfcWxpFile::open | ( | const char * | filename, |
| int | raccess | ||
| ) |
Opens the surface data file
| filename | File to open |
| raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
References WXP::FileAttr::APPEND, checkType(), close(), WXP::DateTool::createLabel(), WXP::DateTool::decode(), WXP::String::get(), WXP::File::getLine(), WXP::FileTool::getSize(), WXP::File::isOpen(), WXP::Date::isSet(), WXP::File::open(), WXP::File::printf(), WXP::FileAttr::READ, WXP::File::skipLine(), WXP::File::tell(), WXP::StrLib::trimWS(), and WXP::FileAttr::WRITE.
Referenced by WXP::SfcFile::open(), SfcWxpFile(), and SfcWxpFile().
| int SfcWxpFile::read | ( | SfcData & | data | ) |
Reads a single report/station from the data file
| data | SfcData class to put the data from the file |
References WXP::Date::adjustMinute(), WXP::Convert::FtoC(), WXP::Date::getHour(), WXP::File::getLine(), WXP::Strings::getNum(), WXP::SfcData::init(), WXP::Convert::INtoCM(), WXP::Convert::INtoMM(), WXP::Const::MISS, and WXP::Strings::scanf().
Referenced by WXP::SfcFile::read().
| int SfcWxpFile::rewind | ( | ) |
Rewinds the surface data file
References WXP::FileAttr::READ, WXP::File::rewind(), and WXP::File::skipLine().
Referenced by WXP::SfcFile::rewind().
| int SfcWxpFile::setDate | ( | Date & | rdate | ) |
Sets the date of the file
| rdate | Date class containing date information |
Referenced by WXP::SfcFile::setDate().