WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::SfcWxpFile Class Reference

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)

Detailed Description

This class reads in surface data from a WXP formatted file from file.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ SfcWxpFile() [1/3]

SfcWxpFile::SfcWxpFile ( )

Constructor

◆ SfcWxpFile() [2/3]

SfcWxpFile::SfcWxpFile ( const char * filename)

Constructor. Opens the surface data file (access=READ, type=UNK)

Parameters
filenameFile to open

References open(), and WXP::FileAttr::READ.

◆ SfcWxpFile() [3/3]

SfcWxpFile::SfcWxpFile ( const char * filename,
int raccess )

Constructor. Opens the surface data file

Parameters
filenameFile to open
raccessAccess type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)

References open().

◆ ~SfcWxpFile()

SfcWxpFile::~SfcWxpFile ( )

Destructor

Member Function Documentation

◆ checkType()

int SfcWxpFile::checkType ( const char * filename)
static

Checks the type of data in the file

Parameters
filenameFile to check

References WXP::FileTool::getSize().

Referenced by open().

◆ close()

int SfcWxpFile::close ( )

Closes the surface data file

Referenced by open().

◆ getDate()

int SfcWxpFile::getDate ( Date & rdate)

Gets the date of the file

Return values
rdateDate class to put date information

◆ open()

int SfcWxpFile::open ( const char * filename,
int raccess )

◆ read()

int SfcWxpFile::read ( SfcData & data)

Reads a single report/station from the data file

Return values
dataSfcData class to put the data from the file

References WXP::Date::adjustMinute(), WXP::Convert::FtoC(), WXP::Strings::getNum(), WXP::SfcData::init(), WXP::Convert::INtoCM(), WXP::Convert::INtoMM(), WXP::Const::MISS, and WXP::Strings::scanf().

◆ rewind()

int SfcWxpFile::rewind ( )

Rewinds the surface data file

References WXP::FileAttr::READ.

◆ setDate()

int SfcWxpFile::setDate ( Date & rdate)

Sets the date of the file

Return values
rdateDate class containing date information

The documentation for this class was generated from the following files: