|
WXP C++ Library Version 6.74.9
|
This class reads in surface data from a WXP formatted file from file. More...
#include "../include/SfcXmlFile.h"
Public Types | |
| enum | { UNK , NORM , COMPRESS } |
Public Member Functions | |
| SfcXmlFile () | |
| SfcXmlFile (const char *filename) | |
| SfcXmlFile (const char *filename, int access) | |
| SfcXmlFile (const char *filename, int access, int rtype) | |
| ~SfcXmlFile () | |
| bool | isOpen () |
| int | open (const char *filename, int access, int rtype) |
| int | rewind () |
| int | close () |
| int | setDate (Date &rdate) |
| int | getDate (Date &rdate) |
| 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.
| SfcXmlFile::SfcXmlFile | ( | ) |
Constructor
| SfcXmlFile::SfcXmlFile | ( | const char * | filename | ) |
Constructor. Opens the surface data file (access=READ, type=UNK)
| filename | File to open |
References open(), and WXP::FileAttr::READ.
| SfcXmlFile::SfcXmlFile | ( | 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().
| SfcXmlFile::SfcXmlFile | ( | const char * | filename, |
| int | raccess, | ||
| int | rtype | ||
| ) |
Constructor. Opens the surface data file
| filename | File to open |
| raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
| rtype | File type (NORMAL, COMPRESS) |
References open().
| SfcXmlFile::~SfcXmlFile | ( | ) |
Destructor
References close().
|
static |
Checks the type of data in the file
| filename | File to check |
References WXP::File::isOpen(), and WXP::File::scanf().
Referenced by open().
| int SfcXmlFile::close | ( | ) |
Closes the surface data file
References WXP::FileAttr::WRITE.
Referenced by WXP::SfcFile::close(), and ~SfcXmlFile().
| int SfcXmlFile::getDate | ( | Date & | rdate | ) |
Gets the date of the file
| rdate | Date class to put date information |
Referenced by WXP::SfcFile::getDate().
| int SfcXmlFile::open | ( | const char * | filename, |
| int | raccess, | ||
| int | rtype | ||
| ) |
Opens the surface data file
| filename | File to open |
| raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
| rtype | File type (NORMAL, COMPRESS) |
References checkType(), WXP::DateTool::createLabel(), WXP::DateTool::decode(), WXP::StrLib::equal(), WXP::String::get(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by WXP::SfcFile::open(), SfcXmlFile(), SfcXmlFile(), and SfcXmlFile().
| int SfcXmlFile::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::StrLib::copy(), WXP::StrLib::equal(), WXP::Convert::FtoC(), and WXP::SfcData::init().
Referenced by WXP::SfcFile::read().
| int SfcXmlFile::rewind | ( | ) |
Rewinds the surface data file
References WXP::FileAttr::READ.
| int SfcXmlFile::setDate | ( | Date & | rdate | ) |
Sets the date of the file
| rdate | Date class containing date information |
Referenced by WXP::SfcFile::setDate().