WXP C++ Library Version 6.74.9
|
This class reads in surface data from a file from file. More...
#include "../include/SfcFile.h"
Public Types | |
enum | Type { UNK , WXP , NETCDF , XML , XMLC , UNISYS } |
Public Member Functions | |
SfcFile () | |
SfcFile (const char *filename) | |
SfcFile (const char *filename, int access, int type) | |
~SfcFile () | |
bool | isOpen () |
int | open (const char *filename, int access, int type) |
int | open (const char *filename, int access, const char *type) |
int | open (const char *filename) |
int | rewind () |
int | close () |
int | getDate (Date &rdate) |
const char * | getDatim () |
int | setDate (Date &rdate) |
int | read (SfcData &data) |
int | write (SfcData &data) |
Static Public Member Functions | |
static int | checkType (const char *filename) |
static int | getType (const char *type) |
This class reads in surface data from a file from file.
SfcFile::SfcFile | ( | ) |
Constructor
SfcFile::SfcFile | ( | const char * | filename | ) |
Constructor. Opens the surface data file (access=READ, type=UNK)
filename | File to open |
References open(), and WXP::FileAttr::READ.
SfcFile::SfcFile | ( | 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 | Type of file (WXP, NETCDF, UNISYS) |
References open().
SfcFile::~SfcFile | ( | ) |
Destructor
References close().
|
static |
Checks the type of data in the file
filename | File to check |
References WXP::File::isOpen(), and WXP::File::read().
Referenced by open().
int SfcFile::close | ( | ) |
Closes the surface data file
References WXP::SfcCdfFile::close(), WXP::SfcWxpFile::close(), and WXP::SfcXmlFile::close().
Referenced by open(), and ~SfcFile().
int SfcFile::getDate | ( | Date & | rdate | ) |
Gets the date of the file
rdate | Date class to put date information |
References WXP::SfcCdfFile::getDate(), WXP::SfcWxpFile::getDate(), and WXP::SfcXmlFile::getDate().
Referenced by WXP::SfcRaw::compute(), and WXP::SfcPlot::draw().
int SfcFile::open | ( | const char * | filename | ) |
Opens the surface data file (access=READ, type=UNK)
filename | File to open |
References open(), and WXP::FileAttr::READ.
int SfcFile::open | ( | const char * | filename, |
int | raccess, | ||
const char * | rtype | ||
) |
Opens the surface data file
filename | File to open |
raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
rtype | Type of file (WXP, NETCDF, XML, XMLC, UNISYS) |
References open().
int SfcFile::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 | Type of file (WXP, NETCDF, UNISYS) |
References WXP::FileAttr::APPEND, checkType(), close(), WXP::File::isOpen(), WXP::File::open(), WXP::SfcCdfFile::open(), WXP::SfcWxpFile::open(), WXP::SfcXmlFile::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by WXP::SfcRaw::compute(), open(), open(), SfcFile(), and SfcFile().
int SfcFile::read | ( | SfcData & | data | ) |
Reads a single report/station from the data file
data | SfcData class to put the data from the file |
References WXP::SfcCdfFile::read(), WXP::SfcWxpFile::read(), and WXP::SfcXmlFile::read().
Referenced by WXP::SfcRaw::compute(), and WXP::SfcPlot::draw().
int SfcFile::rewind | ( | ) |
Rewinds the surface data file
References WXP::SfcWxpFile::rewind().
Referenced by WXP::SfcPlot::draw().
int SfcFile::setDate | ( | Date & | rdate | ) |
Sets the date of the file
rdate | Date of file |
References WXP::SfcCdfFile::setDate(), WXP::SfcWxpFile::setDate(), and WXP::SfcXmlFile::setDate().